Changing the series SamplingMode based on the zoom level


https://www.nevron.com/Forum/Topic11876.aspx
Print Topic | Close Window

By Irina - 8 Years Ago
Hi,
Is it possible to change the series SamplingMode property from Enabled to Disabled when the chart control is zoomed in based on the number of visible data points? If yes, what is the best way to do this?
Thanks
By Nevron Support - 8 Years Ago
Hi Irina,
You can dynamically change the sampling mode, however we don't think that will be necessary as it will only aggregate points when they are close to each other (pixel distance less than 1) so most likely when you zoom in the data points will be at much larger distances and there will be no data point aggregation / sampling.
By Irina - 8 Years Ago
Hi,
I've attached an archive that contains 3 images. They show the same line series with more than 100000 data points and at the same zoom level, but SamplingMode and RenderSurface settings are different in all three cases (the settings are written on each image). As you can see, the images are completely different (only the first one with SamplingMode = Disabled shows data correctly), but, according to your answer, there should be no data point aggregation / sampling when the chart is zoomed. So, why does the line series look different depending on SamplingMode and RenderSurface settings?
Another question: how can I find out the number of visible data points when the chart’s zoom level is changed? What property should I use?
Thank you
By Nevron Support - 8 Years Ago
Hi Irina,

Can you send an example replicating this issue to support@nevron.com