Page 1 of 1

Refresh position of the left axis

Posted: Mon Apr 14, 2014 7:53 am
by 15654539
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

Re: Refresh position of the left axis

Posted: Mon Apr 14, 2014 10:06 am
by Christopher
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);
          }
        }