|
Max Zoom C++ |
Posted by Sainath on Sep-30-2013 22:47 |
|
Hello Peter,
How to find maximum zoom supported by chart for given number of data points before calling Drawchart function.
Actually I want to calculate ZOOM_FACTOR in initChartViewer(CChartViewer *viewer)
viewer->setViewPortWidth(ZOOM_FACTOR);
Regards,
Sainath |
Re: Max Zoom C++ |
Posted by Peter Kwan on Sep-30-2013 23:14 |
|
Hi Sainath,
If you are using a date/time or numeric axis, the zooming is control by the data range, which is not necessarily the same as the number of data points.
For example, if your full data are 200 days with 2000 data points, and you would like to display 60 days of data, the zoom factor is 60 / 200. It can mean 1900 data points (if most of all your data points are concentrated on these 60 days and the other 140 days contain only a few data points), or if can be 0 data point (if no data point fall within that 60 days), or 600 data points (if the data points are evenly distributed).
The "maximum zoom" support is set up by your code using the CChartViewer.setZoomInWidthLimit or CChartViewer.setZoomInHeightLimit. You can set it to any value suitable for your application.
Should you need further information, please feel free to contact me.
Regards
Peter Kwan |
|