A line connecting the (base) points of an arrow series

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
I-Maps
Newbie
Newbie
Posts: 15
Joined: Fri Oct 21, 2005 4:00 am
Location: South Africa

A line connecting the (base) points of an arrow series

Post by I-Maps » Thu Oct 27, 2005 2:18 pm

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Oct 28, 2005 2:10 pm

Hi Reg,

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
Image Image Image Image Image Image
Instructions - How to post in this forum

I-Maps
Newbie
Newbie
Posts: 15
Joined: Fri Oct 21, 2005 4:00 am
Location: South Africa

Post by I-Maps » Mon Oct 31, 2005 6:52 am

Thank you.

Much appreciated.

Post Reply