简体   繁体   English

绘制后调整MSChart Y标签

[英]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. MSChart的问题在于,绘制Y轴标签值后,我需要对其进行调整。

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. 绘制完数组的所有元素后,我需要调整Y轴标签值。

  • Currently the data is ranging from 0 - 300. 当前数据范围是0-300。
  • I am neededin to adjust the Y axis label from 0 - 300 to -150 to 150. 我需要将Y轴标签从0-300调整到-150至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. 我曾尝试在此foreach语句后添加customLabel,但仍显示相同的旧Y轴标签(0-300)。 Im wanting the Can anyone please help me. 我想要任何人都可以帮助我。

Thanks so much in advance" 提前非常感谢”

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

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

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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