Hi
I have an arrow series in 2-d.
I want to know if it is possible to draw a line that joins all the base (XStart,YStart) points.
I realise that I could have two series: an arrow series and a line series, both filled with the same data.
I am hoping that it is possible to have just the one series, as I allow my users to move the arrows around, at it gets messy having to write code that moves the one series points to follow the other's.
Regards
Reg Bust
A line connecting the (base) points of an arrow series
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Hi Reg,
Yes, you can custom draw on TeeChart's canvas at its AfterDraw event:
Yes, you can custom draw on TeeChart's canvas at its AfterDraw event:
Code: Select all
private void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
{
int c=tChart1.Axes.Depth.IAxisSize/2; //When not 3D is 0.
g.ClipRectangle(tChart1.Chart.ChartBounds);
for (int i=0;i<arrow1.Count-1;++i)
{
tChart1.Graphics3D.Pen.Color=Color.Blue;
tChart1.Graphics3D.MoveTo(arrow1.CalcXPos(i)+c,arrow1.CalcYPos(i)-c);
tChart1.Graphics3D.LineTo(arrow1.CalcXPos(i+1)+c,arrow1.CalcYPos(i+1)-c);
}
g.UnClip();
}
Best Regards,
Narcís Calvet / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |