1.Axis

Aixs属于一个ChartArea,因此对它的设置都需要通过某个ChartArea来进行。

1.1Axis Types

1.2Axis Scale 

1)设置X轴显示间隔

      chart1.ChartAreas[0].AxisX.Interval  =1;

2)设置Y轴数值最小值自动计算

chart.ChartAreas["Chart Area 1"].AxisY.StartFromZero = false;

最小值会根据要绘制的数据自动计算出来。

3)设置Y或X轴数值显示的极值

缺省情况,极值为Auto模式,即将Minimum 和Maximum 值设为double.NaN;

chart.ChartAreas["Chart Area 1"].AxisY.Minimum = double.NaN;
chart.ChartAreas["Chart Area 1"].AxisY.Maximum = double.NaN;

设置为某一具体值时,表示

Both the Minimum and Maximum axis properties can be set to a specific value, or they can be set to Auto

  

4.Lable

1)设置X轴的标签为竖向显示。当标签比较长时,竖向显示比较方便

chart1.ChartAreas[0].AxisX.LabelsAutoFitStyle = LabelsAutoFitStyle.LabelsAngleStep90;

6.Series

1)数据点的形状

chart1.Series["切丝水分"].MarkerStyle = MarkerStyle.Diamond;

2)数据点旁显示数值

chart.Series[seriesName].ShowLabelAsValue = true;

 

其他

1)显示提示信息

this.chart2.GetToolTipText += DDSHelper.Event_ToolTipText;

posted on 2009-11-25 13:01  Tony Ma  阅读(822)  评论(0编辑  收藏  举报