Is there a tool to draw shapes on a chart?
Is there a tool to draw shapes on a chart?
I have a chartwith a candle series. My employer wants me to add the capability to draw circles and ellipses on the candle chart. Is there such a tool?
Hi WD_Gordon!
I propos one solution, you can help.
You, can use events OnMouseUp, and OnMouseDown as next exemple:
OnMouseDown
OnMouseUp
You needs assign X0,Y0,X1,Y1 values,because you does not draw correct circle. If you would draw an ellipse, you just have to draw the circle lying.
Thanks,
Best Regards
Sandra Pazos
Steema Support Central
http://support.steema.com
I propos one solution, you can help.
You, can use events OnMouseUp, and OnMouseDown as next exemple:
OnMouseDown
Code: Select all
private void tChart1_MouseDown(object sender, MouseEventArgs e)
{
Steema.TeeChart.Styles.Shape sh = new Steema.TeeChart.Styles.Shape(tChart1.Chart);
sh.Style = ShapeStyles.Circle;
sh.Transparent = true;
sh.X0 = tChart1.Axes.Bottom.CalcPosPoint(e.X);
sh.Y0 = tChart1.Axes.Left.CalcPosPoint(e.Y);
}
Code: Select all
private void tChart1_MouseUp(object sender, MouseEventArgs e)
{
((Steema.TeeChart.Styles.Shape)tChart1[tChart1.Series.Count - 1]).X1 = tChart1.Axes.Bottom.CalcPosPoint(e.X);
((Steema.TeeChart.Styles.Shape)tChart1[tChart1.Series.Count - 1]).Y1 = tChart1.Axes.Left.CalcPosPoint(e.Y);
tChart1[tChart1.Series.Count - 1].Repaint();
}
Thanks,
Best Regards
Sandra Pazos
Steema Support Central
http://support.steema.com