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 ?
Draw Cursor Tool behind series lines and marks
-
- Newbie
- Posts: 52
- Joined: Tue Mar 04, 2003 5:00 am
-
- Site Admin
- Posts: 1349
- Joined: Thu Jan 01, 1970 12:00 am
- Location: Riudellots de la Selva, Catalonia
- Contact:
Hi --
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.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 ?
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();
}
Thank you!
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/
Christopher Ireland (Steema crew)
Please be aware of the newsgroup archives:
http://www.teechart.net/support/search.php
http://groups.google.com
http://codenewsfast.com/