Refresh position of the left axis

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
acastro
Advanced
Posts: 204
Joined: Tue Oct 27, 2009 12:00 am

Refresh position of the left axis

Post by acastro » Mon Apr 14, 2014 7:53 am

When I refresh the data of the chart if the new values are much higher the margin is not updated in his position. It seems to be a refresh thing because if I save the chart and open it again the margin is right.

Here an example to reproduce:
http://193.145.251.126/pnp/files/fqAkPQ ... croll2.zip

Press button "refreshdata" (the margin is not right), then "Save" and then "open" (the margin is right)

Thanks

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

Re: Refresh position of the left axis

Post by Christopher » Mon Apr 14, 2014 10:06 am

wakeup wrote:Press button "refreshdata" (the margin is not right), then "Save" and then "open" (the margin is right)
Try setting FixedLabelSize to false, e.g.:

Code: Select all

        private void button8_Click(object sender, EventArgs e)
        {
          tChart1.Axes.Left.FixedLabelSize = false;
          for (int i = 0; i < tChart1.Series.Count; i++)
          {
            tChart1.Series[i].FillSampleValues();
          }

          for (int i = 0; i < tChart1.Series[0].YValues.Count; i++)
          {
            tChart1.Series[0].YValues[i] = Math.Round(tChart1.Series[0].YValues[i] * 1000000);
          }
        }
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