This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, The Zoom function of the Chart control has serious performance problem, when you zoom in, the memory goes up, then the application will be shut down by Windows operating system. Please try the sample project in the attachment, I hope you can solve this problem soon. Or is there any way to limit the zoom level of the chart? I have searched the forum and I did not find the answer how to limit the zoom level. |
|
|
Hello Rossi You can limit the zoom per axis by setting the MinimumRange property of an axis. So if you set this value to 1 on the X Axis, once the user has zoomed in enough for the X axis to display 1 unit, it will not be able to zoom in further. Note that the Y axis may still zoom though because this option is per axis, so you may want to set a suitable value for both axis if they can both be zoomed. Or change the ZoomMode of the chart to only allow Horizontal zoom if that makes sense for your data. If Setting the MinimumRange causes the chart to crash when you zoom right in, simply get the next nightly build which resolves an issue. -Jason Fauchelle |
|
|
Hi Jason, I have tried the latest nightly build WpfElements6Professional-20140622.msi, after setting the MinimumRange, the performance problem is solved. But my question is: what is the unit of the MinimumRange? I cannot figure it out, so I don't how to set it in my product project. |
|
|
Hello This will depend on what type of data you are plotting along the axis. If you are plotting DateTime values, then you can set the MinimumRange to be the Ticks value of an appropriate TimeSpan. If you have a log scale, then MinimumRange = 1 will mean the minimum range is the distance between base^n and base^n+1. If you are just plotting numbers, then setting the MinimumRange to 1 will mean that the axis can only zoom in far enough to show values between 2 consecutive numbers. If you're still not sure what to use, let me know the minimum and maximum values of you chart, and what you want the minimum range to be. -Jason Fauchelle |
|
|
Hi Jason, I was wrong. I thought the crash problem was solved, but after testing, I find that the crash problem when zooming is not solved. I have triedthe latest version "WpfElements6Professional-20140622.msi", and I have set the MinimumRange to 1 on all axis. The key point is that, I need to use LogarithmicAxisValueConverter. Please download the sample project in the attachment, and run it, and try to zoom in the white space in the chart, you will see that, after a while, the application will crash. |
|
|
Hello Thanks for pointing this out and sending the repo project. This bug has been resolved and the fix will be available in the next nightly build. -Jason Fauchelle |
|