开发者

Adjust MSChart Y Labels after drawn

开发者 https://www.devze.com 2023-02-16 03:37 出处:网络
The problem im having with MSChart is that I am needing to adjust my Y axis label values after they have been 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"


Maybe instead of .AddXY(i, data) do this:

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

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号