Page 1 of 1
Draw Cursor Tool behind series lines and marks
Posted: Fri Nov 05, 2004 4:30 am
by 8119814
Hi,
The Cursor Tool (vertical in my case) is drawn in front of series lines and marks. Is it possible to send the Cursor Tool behind both of them ?
Posted: Tue Nov 09, 2004 8:44 am
by Chris
Hi --
The Cursor Tool (vertical in my case) is drawn in front of series lines and marks. Is it possible to send the Cursor Tool behind both of them ?
No, I'm afraid this is not possible; however, you can draw your own cursor tool onto TChart's canvas using one of the canvas events (see the Features Demo -> All Features -> Welcome -> Canvas -> Canvas Events) e.g.
Code: Select all
private void Form1_Load(object sender, System.EventArgs e) {
line1.FillSampleValues();
line1.HorizAxis = Steema.TeeChart.Styles.HorizontalAxis.Both;
tChart1.Axes.Top.Labels.Visible=false;
}
private void tChart1_BeforeDrawSeries(object sender, Steema.TeeChart.Drawing.Graphics3D g) {
if(((System.Drawing.Rectangle)((object)(g.Chart.ChartRect))).Contains(mouseX, mouseY)) {
g.Pen.Color = Color.Blue;
g.Line(mouseX, tChart1.Axes.Top.Position, mouseX, tChart1.Axes.Bottom.Position);
}
}
private int mouseX, mouseY;
private void tChart1_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e) {
mouseX = e.X;
mouseY = e.Y;
tChart1.Invalidate();
}