Page 1 of 1

How to change the pen style?

Posted: Wed Apr 01, 2009 10:26 am
by 9641422
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

Posted: Wed Apr 01, 2009 2:54 pm
by narcis
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);