Exception when re-sizing to minimum...

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
Raavi
Newbie
Newbie
Posts: 36
Joined: Tue Apr 01, 2014 12:00 am

Exception when re-sizing to minimum...

Post by Raavi » Tue May 20, 2014 11:07 am

Attached the exception window when,

I try to re-size the window to absolute minimum and bringing the size back to normal and then pressing left button mouse down to zoom it back an exception is thrown.

Chart contains a line with IsoHorizAxes =true and

tChart1.BeforeDrawSeries += tChart1_BeforeDrawSeries;

void tChart1_BeforeDrawSeries(object sender, Graphics3D g)
{
tChart1.Axes.Bottom.AdjustMaxMin();
}
Attachments
Exception.png
Exception.png (19.16 KiB) Viewed 4025 times

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: Exception when re-sizing to minimum...

Post by Christopher » Wed May 21, 2014 9:47 am

Hello Raavi,
Raavi wrote:I try to re-size the window to absolute minimum and bringing the size back to normal and then pressing left button mouse down to zoom it back an exception is thrown.
Try:

Code: Select all

      tChart1.Resize += tChart1_Resize;

      tChart1.BeforeDrawSeries += tChart1_BeforeDrawSeries;
    }

    void tChart1_Resize(object sender, EventArgs e)
    {
      Rectangle rect = tChart1.Chart.ChartRect;

      if (rect.Height <= 5 || rect.Width <= 5)
      {
        tChart1[0].IsoHorizAxes = false;
      }
      else if (rect.Height >= 5 && rect.Width >= 5)
      {
        tChart1[0].IsoHorizAxes = true;
      }
    }
Best Regards,
Christopher Ireland / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Instructions - How to post in this forum

Post Reply