Issuw with TChart8 ActiveX Axis Labels

TeeChart for ActiveX, COM and ASP
Post Reply
Ssnsam
Newbie
Newbie
Posts: 6
Joined: Mon Mar 03, 2008 12:00 am
Contact:

Issuw with TChart8 ActiveX Axis Labels

Post by Ssnsam » Tue Oct 21, 2008 5:42 am

Hello,

I have chart of type scbar. Some of the labels in the bottom axis are not shown. If the label length is long it s not shown. I tries doing the same with edit chart in the user Interface, then all the labels are shown.

The following code I have written.

m_oChart.AddSeries(scBar);
m_oChart.GetPage().SetMaxPointsPerPage(5);
m_oChart.Series(0).GetMarks().SetVisible(false);
m_oChart.GetAxis().GetBottom().GetLabels().SetAlternate(true);
m_oChart.Series(0).Add(100,"My test Label 1",RGB(0,0,255));
m_oChart.Series(0).Add(200,"My test Label 2",RGB(0,0,255));
m_oChart.Series(0).Add(50,"My Long test Label 3",RGB(0,0,255));
m_oChart.Series(0).Add(150,"My Long test Label 4",RGB(0,0,255));
m_oChart.Series(0).Add(10,"My Long test Label 5",RGB(0,0,255));

Does the showing of label depend on the ActiveX width?

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 Oct 21, 2008 8:35 am

Hi Ssnsam,

Yes, this depends on chart's width and also that labels don't overlap. If labels are long they have more chances to overlap each other and therefore some of them not being painted. Also, you may want to set label's angle to 90 so they are all displayed:

Code: Select all

	m_Chart1.GetAxis().GetBottom().GetLabels().SetAngle(90);
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