Page 1 of 1

Paging - Determining when it is needed?

Posted: Wed Oct 22, 2008 5:21 pm
by 10550560
Hi,

New user question here...

I've noticed that if I:

1. Generate a horizontal bar graph (for example) with all rows visible
2. Have a DataTable to the left of the chart
3. Resize the form vertically shrinking the graph area

Doing this, some datatable rows disappear (though the bars are still there), so I understand there is a need for paging at this point.

Is it possible to detect when this "truncation" condition occurs so I can warn the user or take the appropriate action (such as starting paging)? Is there a preferred approach to handling this?

Thanks,
Mike Simmons

Posted: Thu Oct 23, 2008 10:09 am
by narcis
Hi Mike,

I'm not sure if this is what you mean but what I see here is that all bars are displayed but some labels and therefore their datatable entries disappear. This is because TeeChart automatically prevents axes labels from overlapping so when axis size would make this happen axis increment is automatically changed. Can you please confirm this is what you mean?

Thanks in advance.

Posted: Thu Oct 23, 2008 1:33 pm
by 10550560
Hi Narcis,

Yes, that is what I mean.

Is it possible to detect when this condition occurs?

And in general, is there a way to determine whether there will be a need for multiple pages based on the number of points and series?

Thanks,
Mike Simmons

Posted: Mon Oct 27, 2008 12:25 pm
by narcis
Hi Mike,

One way to know how many and which labels will be drawn in an axis is using the OnGetAxisLabel or OnGetNextAxisLabel events. There you can check if axis Increment is what you desired and the label being added is what you expected or you need to customize it there.