简体   繁体   中英

Adjust MSChart Y Labels after drawn

The problem im having with MSChart is that I am needing to adjust my Y axis label values after they have been drawn.

Here is how I plot my chart

foreach(Int16 data in array)
{
   chart.Series["MySeries"].Points.AddXY(i, data);
   i++;
}

After I have drawn up all elelemt of my array I am needing to adjust the Y-Axis Label values.

  • Currently the data is ranging from 0 - 300.
  • I am neededin to adjust the Y axis label from 0 - 300 to -150 to 150.
  • Actual data values potted to remain the same, just edit the label values.

I have tried adding customLabel after this foreach statement but the same old Y-axis label (0-300) is still shown. Im wanting the Can anyone please help me.

Thanks so much in advance"

也许代替.AddXY(i,data)这样做:

chart.Series["MySeries"].Points.AddXY(i, data - 150);

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM