Is there a tool to draw shapes on a chart?
Posted: Wed Jan 21, 2009 7:04 pm
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?
Steema Software - Customer Support Forums
http://216.92.101.67/support/
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();
}