图表区域的最大值和最小值 [英] Chart area maximum and minimums

查看:134
本文介绍了图表区域的最大值和最小值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法将最大Y轴设置为控制参数/文本框或图表控件或代码后面的系列最大值?



我希望能够根据查询的数据设置MAX和MIN。

例如,如果给定时间(X轴)的Y(轴)值为80,而目标为70.

我想要AxisY Maximum =target+20 and AxisY Minimum =target-20



我尝试过:



< asp:ChartArea Name =ChartArea1>

< AxisY Maximum =AutoMinimum =Auto>

解决方案

对于任何关注此事的人,我找不到解决方案,但我确实找到了防止Y轴始终从零开始的位置。

您可以在ChartAreas  - >下的属性窗口中找到该属性。 Axis Collection  - > Y轴 - > IsStartedFromZero或通过代码:

//从我的数据集中的最小值开始Y轴标记
this.Chart2.ChartAreas [0] .AxisY.IsStartedFromZero = false;


Is there a way set the Maximum Y axis to a Control Parameter/textbox or series Maximum in chart control or code behind?

I would like to be able to set the MAX and MIN depending on the data queried.
For example, if I have an Y (axis) "value" of 80 for a given time (X axis) and "target" of 70.
I would like AxisY Maximum= "target" +20 and AxisY Minimum = "target" -20

What I have tried:

<asp:ChartArea Name="ChartArea1">
<AxisY Maximum= "Auto" Minimum= "Auto" >

解决方案

For anyone looking into this, I couldn't find a solution, but I did find where to prevent the Y axis from always starting at zero.

You can find the property in the property window under ChartAreas –> Axis Collection –> Y-Axis –> IsStartedFromZero or through code:
	
// Start Y-axis labeling from the minimum value in my dataset
this.Chart2.ChartAreas[0].AxisY.IsStartedFromZero = false;


这篇关于图表区域的最大值和最小值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆