标签:
axTChart1.Header.Left= axTChart1.Header.Left + 50;
axTChart1.Header.Brush.Style = TeeChart.EBrushStyle.bsBackCrossSmall;//背景样式
axTChart1.Header.ShadowColor=(uint)(1255);
说明(Legend):
axTChart1.Legend.ShadowSize = 6;
面板(Panel):
1
2
3
4
|
axTChart1.Panel.Gradient.Visible = true ; axTChart1.Panel.Gradient.StartColor = ( uint )(1); axTChart1.Panel.Gradient.EndColor = ( uint )(13000); axTChart1.Panel.Gradient.Direction = TeeChart.EGradientDirection.gdFromTopLeft; |
3D效果:
Chart分页:
axTChart1.Page.Previous();
坐标(Axis):
1
2
3
4
5
6
7
|
for ( int i = 1; i <= 20; i++) { axTChart1.Series(1).Add(i*i, i.ToString(), ( uint )(50000)); } |
1
2
3
4
|
axTChart1.Axis.Left.Automatic = false ; //必须有,或者用.AutomaticMaximum等代替 axTChart1.Axis.Left.Maximum = 600; //最大值的声明必须在最小值先,否则报错 axTChart1.Axis.Left.Minimum = 500; axTChart1.Axis.Left.Increment = 20; |
1
2
3
|
axTChart1.Axis.Left.AutomaticMaximum = false ; axTChart1.Axis.Left.Maximum = 600; axTChart1.Axis.Left.AutomaticMinimum = true ; |
(* 结论: 在设置最大最小值时,没设置最大值就设置最小值将失败)
自定义轴标签(添加轴事件):
1
2
3
|
private void axTChart1_OnGetAxisLabel( object sender, AxTeeChart.ITChartEvents_OnGetAxisLabelEvent e) { e.labelText = "p" + e.valueIndex.ToString(); } |
设置轴自定义标签:
1
2
3
4
|
axTChart1.Axis.Left.Logarithmic = true ; axTChart1.Axis.Left.Increment = 0; //默认为0 axTChart1.Axis.Left.SetMinMax(0, 10000); axTChart1.Axis.Left.Labels.ValueFormat = "#e+0" ; |
自定义交叉坐标轴:只能在chart Editor中设置。
坐标轴点击事件:
1
2
3
4
5
|
private void axTChart1_OnClickAxis( object sender, AxTeeChart.ITChartEvents_OnClickAxisEvent e) { MessageBox.Show(axTChart1.Axis.Bottom.CalcPosPoint(e.x).ToString()); //显示位置 } |
Series:
1
2
3
4
|
TeeChart.ESeriesClass ns = new TeeChart.ESeriesClass(); int index = axTChart1.AddSeries(ns); axTChart1.Series(index).HorizontalAxis = TeeChart.EHorizontalAxis.aTopAxis; axTChart1.Series(index).VerticalAxis = TeeChart.EVerticalAxis.aRightAxis; |
1
2
|
axTChart1.Series(1).DataSource = "Series0" ; axTChart1.Series(1).SetFunction(TeeChart.EFunctionType.tfCopy); |
1
|
axTChart1.ExchangeSeries(0, 1); //After exchanging Series, the index for the Series will be changed. |
标签:
原文地址:http://www.cnblogs.com/qiyecao/p/4269363.html