x轴的比例 - 如何改变 [英] Scale of x Axis - how to change

查看:101
本文介绍了x轴的比例 - 如何改变的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的图表中我有:



Y

20

15

10

5

0

X 10 20 30 40 50



我想:



X 1 2 3 4 5 6 7 8 9 10 ....



如何改变比例?

in my chart i have :

Y
20
15
10
5
0
X10 20 30 40 50

I want :

X 1 2 3 4 5 6 7 8 9 10 ....

How to change scale ?

推荐答案

来自激励(图表控件) [ ^ ]:



From Axes (Chart Controls)[^]:

< ;自定义grid =和=tick =mode =hold>

默认情况下,Chart控件根据数据系列自动设置图表区域中轴的比例。您可以手动设置每个轴的Minimum,Maximum,Interval,IntervalOffset,IntervalType和IntervalOffsetType属性。您可以通过为轴的MajorGrid,MinorGrid,MajorTickMark,MinorTickMark和LabelStyle属性定义不同的设置来进一步自定义它们。如果在轴和其中一个组件中设置相同的属性(例如,AxisY和AxisY.MajorGrid中的Minimum属性),则组件设置优先。



当Axis.Interval设置为Auto时,Axis.IntervalAutoMode属性确定应计算的间隔数。如果在运行时经常调整图表大小或重新绘制图表,则可以将Axis.IntervalAutoMode属性设置为VariableCount。这样,图表可以动态计算轴间隔。如果图表间隔根据数据显示不同,这很有用。



您还可以通过将Axis.IsLogarithmic属性设置为true来使用对数刻度。
<customizing grid="" and="" tick="" mode="hold">
By default, the Chart control automatically sets the scale of the axes in chart areas based on its data series. You can manually set the Minimum, Maximum, Interval, IntervalOffset, IntervalType, and IntervalOffsetType properties for each axis. You can further customize them by defining different settings for an axis's MajorGrid, MinorGrid, MajorTickMark, MinorTickMark, and LabelStyle properties. If you set the same property in the axis and in one of its components (for example, the Minimum property in both AxisY and AxisY.MajorGrid), the component setting takes precedence.

When Axis.Interval is set to Auto, the Axis.IntervalAutoMode property determines how many intervals should be calculated. If your chart is resized or redrawn often at run time, you can set the Axis.IntervalAutoMode property to VariableCount. This way, the chart dynamically calculates axis intervals. This is useful if the chart intervals are displayed differently depending on the data.

You can also use a logarithmic scale by setting the Axis.IsLogarithmic property to true.



请参阅 Axis Class [ ^ ]对于Axis属性。



微软也有一个全面的例子 Microsoft图表控件的示例环境 [ ^ ]可能有助于您理解图表控件。


See Axis Class[^] for the Axis properties.

Microsoft also has a comprehensive example Samples Environment for Microsoft Chart Controls[^] that might help you understand the chart control.


这篇关于x轴的比例 - 如何改变的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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