How to color an axis?
Posted: Mon Oct 08, 2007 7:25 pm
In my project I need to colour 3 parts of the bottom axis into 3 different colors. How can I do this in teechart v2?
Steema Software - Customer Support Forums
http://216.92.243.79/support/
Code: Select all
private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
int YPos =tChart1.Axes.Bottom.Position;
g.Pen.Width = 2;
g.Pen.Color = Color.Green;
g.Line(tChart1.Axes.Bottom.IStartPos, YPos,
tChart1.Axes.Bottom.CalcXPosValue(5), YPos);
g.Pen.Color = Color.Yellow;
g.Line(tChart1.Axes.Bottom.CalcXPosValue(5), YPos,
tChart1.Axes.Bottom.CalcXPosValue(10), YPos);
g.Pen.Color = Color.Red;
g.Line(tChart1.Axes.Bottom.CalcXPosValue(10), YPos,
tChart1.Axes.Bottom.IEndPos, YPos);
}