Page 1 of 1

Issuw with TChart8 ActiveX Axis Labels

Posted: Tue Oct 21, 2008 5:42 am
by 15048479
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?

Posted: Tue Oct 21, 2008 8:35 am
by narcis
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);