// create custom axes. This can be done at design-time Green = new TeeChart.Axis(tChart1.Chart); this.tChart1.Axes.Custom.Add(Green); Green.AxisPen.Color = Color.Green; Green.StartPosition = 34; Green.EndPosition = 65; Blue = new TeeChart.Axis(tChart1.Chart); this.tChart1.Axes.Custom.Add(Blue); Blue.AxisPen.Color = Color.Blue; Blue.StartPosition = 67; Blue.EndPosition = 100; 高手们帮帮忙吧。
m_Chart.AddSeries(0);
m_Chart.AddSeries(0);
m_Chart.AddSeries(0);
// change the Left axis properties
Steema.TeeChart.Axis axis = this.tChart1.Axes.Left;
axis.AxisPen.Color = Color.Red;
axis.StartPosition = 0;
axis.EndPosition = 32;
// create custom axes. This can be done at design-time
Green = new TeeChart.Axis(tChart1.Chart);
this.tChart1.Axes.Custom.Add(Green);
Green.AxisPen.Color = Color.Green;
Green.StartPosition = 34;
Green.EndPosition = 65; Blue = new TeeChart.Axis(tChart1.Chart);
this.tChart1.Axes.Custom.Add(Blue);
Blue.AxisPen.Color = Color.Blue;
Blue.StartPosition = 67;
Blue.EndPosition = 100;
高手们帮帮忙吧。
m_Chart.AddSeries(0);
CSeries mycs0 = (CSeries)m_Chart.Series(0); mycs0.put_VerticalAxis(0);
mycs0.put_HorizontalAxis(0); // 设置横坐标的最大最小值
CAxes coord=(CAxes)m_Chart.get_Axis();
CAxis left0=(CAxis)coord.get_Left();
left0.put_StartPosition(0);
left0.put_EndPosition(32);
// 第二条曲线
m_Chart.AddSeries(1);
CSeries mycs0 = (CSeries)m_Chart.Series(1); mycs0.put_VerticalAxis(1);
mycs0.put_HorizontalAxis(1); // 设置横坐标的最大最小值
CAxes coord1=(CAxes)m_Chart.get_Axis();
CAxis left1=(CAxis)coord1.get_Left();
left1.put_StartPosition(33);
left1.put_EndPosition(66);
tChart1.Location = new Point(290, 100);
tChart1.Axes.Bottom.Labels.Angle = 45;
tChart1.Aspect.View3D = true; Axis axis1 = tChart1.Axes.Left;
axis1.Automatic = false;
axis1.Minimum = 0;
axis1.Maximum = 800;
axis1.Increment = 0;
axis1.StartPosition = 0;
axis1.EndPosition = 50;
axis1.Grid.Visible = true;
axis1.AxisPen.Color = Color.Red; Axis axis2 = new Axis(tChart1.Chart);
axis2.Automatic = false;
axis2.StartPosition = 52;
axis2.EndPosition = 100;
axis2.Minimum = 0;
axis2.Maximum = 800;
axis2.Increment = 0;
axis2.AxisPen.Color = Color.Blue;
tChart1.Axes.Custom.Add(axis2); //Axes cum_aex = new Axes(tChart1.Chart);
//cum_aex.Left.AxisPen.Color = Color.Blue;
//cum_aex.Left.StartPosition = 52;
//cum_aex.Left.StartPosition = 100;
//cum_aex.Left.Increment = 0;
Steema.TeeChart.Styles.Line line1 = new Steema.TeeChart.Styles.Line(tChart1.Chart);
line1.FillSampleValues(10);
line1.CustomVertAxis = tChart1.Axes[0]; Steema.TeeChart.Styles.Bar bar1 = new Steema.TeeChart.Styles.Bar(tChart1.Chart);
bar1.FillSampleValues(10);
bar1.ColorEach = true;
bar1.CustomVertAxis = axis2;
this.Controls.AddRange(new System.Windows.Forms.Control[] { tChart1 });
这个你应该能看懂吧。