Hi,
I am using TeeChart under Windows XP, VS 2008.
For some reason after definig charts, axes, axes limits, the code:
"m_Chart.GetAxis().GetLeft().GetLabels().Count();"
retruns 0.
m_Chart is an object of CTChart class
If before this call the code:
pView->Invalidate();
pView->UpdateWindow();
is executed, where pView point to an object of a class derived from CFormView, that containes the CTChart object, I get
the correct count and not 0.
Why do I get 0 without the calls to pView? Do I miss any call to a TeeChart object?
Thanks,
Yaacov
CAxis::GetLabels().Count() returns 0
Re: CAxis::GetLabels().Count() returns 0
Hi Yaacov,
Many internal variables in the component are empty until the chart is drawn for first time. In the same way, these variables aren't updated since the chart is redrawn.
That's why we usually recommend to force the chart to be drawn before checking any of its internal variables.
Many internal variables in the component are empty until the chart is drawn for first time. In the same way, these variables aren't updated since the chart is redrawn.
That's why we usually recommend to force the chart to be drawn before checking any of its internal variables.
Best Regards,
![]() | Yeray Alonso Development & Support Steema Software Av. Montilivi 33, 17003 Girona, Catalonia (SP) |
![]() ![]() ![]() ![]() ![]() ![]() |
Please read our Bug Fixing Policy |