How to change the pen style?

TeeChart for ActiveX, COM and ASP
Post Reply
Amol
Advanced
Posts: 176
Joined: Mon May 29, 2006 12:00 am

How to change the pen style?

Post by Amol » Wed Apr 01, 2009 10:26 am

I am using TeeChart7 Active X control.

I am drawing some lines on the TChart. I am able to set the width and color. But when i change the style of pen then the style of pen is not changing. E.g. when i use the following line:

m_Chart.GetCanvas().GetPen().SetStyle(psDashDotDot);

m_Chart.DrawLine(x1,y1,x2,y2);
or
m_Chart.Line(x1,y1,x2,y2);

than the style of the line is not set as desired.

The same styles are functional on series.

Am i missing any step here, due to which the styles are not working.

I desperately need the styles to be working & would appreciate any suggestions in this regard.

Thanks in advance.

Regards
Amol

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

Post by Narcís » Wed Apr 01, 2009 2:54 pm

Hi Amol,

Code below works fine for me here using latest v7 release available at the client area. Can you please check if this works fine at your end?

Code: Select all

	m_Chart1.GetCanvas().GetPen().SetStyle(psDashDotDot);
	m_Chart1.GetCanvas().Line(0,0,100,100);
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