custom painting on a chart

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
ido
Newbie
Newbie
Posts: 19
Joined: Thu Aug 31, 2006 12:00 am

custom painting on a chart

Post by ido » Tue May 20, 2008 9:19 am

hi,
i have a rounded graphics object (bitmap) that i want to paint on a line value. is there a tutorial on custom paining on a line\chart?
Last edited by ido on Tue May 20, 2008 9:28 am, edited 1 time in total.

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

Post by Narcís » Tue May 20, 2008 9:27 am

Hi idan,

Yes, please have a look at Tutorial 13 - Custom drawing on the Chart Panel available at TeeChart's program group.
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

ido
Newbie
Newbie
Posts: 19
Joined: Thu Aug 31, 2006 12:00 am

one more question...

Post by ido » Tue May 20, 2008 9:45 am

I need to paint a bitmap object and on a specific point on a line which the tutorial doesn't reffer to. is there a way to do so?

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

Post by Narcís » Tue May 20, 2008 10:23 am

Hi idan,

In that case you could try using something like this:

Code: Select all

		void tChart1_AfterDraw(object sender, Steema.TeeChart.Drawing.Graphics3D g)
		{
			g.Draw(xPos, yPos, myImage);
		}
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

ido
Newbie
Newbie
Posts: 19
Joined: Thu Aug 31, 2006 12:00 am

what if the values are double?

Post by ido » Tue May 20, 2008 11:37 am

what if the values are double and not int?

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

Post by Narcís » Tue May 20, 2008 1:47 pm

Hi idan,

You should convert them to screen postion coordinates (int) using given methods, for example:

Code: Select all

			int xPos = tChart1.Axes.Left.CalcPosValue(1500);
or

Code: Select all

			int xPos = tChart1.Series[0].CalcXPos(5);
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

Post Reply