我如何...如何将y轴的起始值设置为80并将其增加到1或0.5范围 [英] How do I...How do I set the starting value of the y axis to 80 and increment it my 1 or 0.5 range
本文介绍了我如何...如何将y轴的起始值设置为80并将其增加到1或0.5范围的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试使用以下代码
I tried using the code below
//set interval of y axis to 0.5
chart1.ChartAreas["ChartArea1"].AxisY.LabelStyle.Interval = 0.5;
//how do i set the starting value to be 80....and the max value to be 90
推荐答案
这是图表轴的msdn信息Axis [ ^ ]
然后设置
Here is the msdn info for the Chart Axis Axis[^]
Then set
chart1.ChartAreas["ChartArea1"].AxisY.Minimum = 80;
chart1.ChartAreas["ChartArea1"].AxisY.Maximum = 90;
这也可以直接从属性窗口完成 - > ChartAreas-> Axes-> Y(Value)Axis->最小/最大
还有很多其他属性也可以操作。
从技术上讲,IsStartedFromZero不一定是假的。
This can also be done right from the properties window -> ChartAreas->Axes->Y (Value) Axis->Minimum / Maximum
There are sooo many other properties that can be manipulated too.
And technically the IsStartedFromZero does not have to be false for this to work..
这篇关于我如何...如何将y轴的起始值设置为80并将其增加到1或0.5范围的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文