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
|
The behavior of the axis minimum and maximum seems a bit odd in the case where I set one but not the other. It seems that if the minimum and maximum are equal to each other they will both be auto-calculated. However, if I set the minimum to -10 and don't change the maximum I will get a range -10 to 0. If I set the minimum to 10 and don't change the maximum the minimum I set will be ignored (both auto calculated). Is there a way to set one and have the other auto-calculated? The reason I wan't to do this is I want to give the user the option of changing the axis min and max, and not force the user to change both, and still have the graph behave predictably. |
|
|
Hello Thanks for your observations of using the chart axis. You are correct that both minimum and maximum values will be automatically set when they are both the same. By default both values are zero. In your scenario where you set the minimum to 10, this minimum value is now greater than the current maximum (zero), so the maximum was increased to 10 as well, this resulted in both values being the same and thus they were automatically set. I have improved the behaviour of the chart axis so that you can set either one or both of the values individually. The minimum will be automatically set only if you do not set the minimum property. And same with the maximum property. So now you can set one value and have the other value be auto-calculated. After you have manually set one of the values, you can allow it to be automatic again at any time by setting it to be Double.NaN. This update will be available for download through the next nightly builds from about 1200GMT. Nightly builds can be found on the downloads page: http://www.mindscapehq.com/products/wpfelements/nightly-builds Let us know how it goes. |
|
|
Thank you--this is wonderful support. Peter |
|
|
If one of my axes is time, how to I set it to NaN so it auto-calculates? |
|
|
Hello Leah I've updated the chart component to allow setting min or max to null to cause the min or max to switch to auto calculation. But only if you are using the DateTimeAxisValueConverter. If you are setting the min and max values through bindings, you will of course need to change your model properties to be nullable DateTime. Once you set one to null, the auto calculation will instantly kick in and set the value to the calculated min or max value of the data, this would then get sent back through you binding (if it is two way) to set your model property value. This will be available in the next nightly build. -Jason Fauchelle |
|