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
|
Hello, we using LogarithmicAxis in the Chart, and sometimes we need to start from 0. Is there any way to set in LogarithmicAxisValueConverter Minimum to 0? |
|
|
Hello Vadim I've added in a new property on the LogarithmicAxisValueConverter called StartsFromZero. Setting this to true will cause the converter to start the scale at 0. This property will be in the next nightly build. The next nightly build will be available at around 1200 GMT (about 14 hours from now). Nightly builds can be downloaded from here: http://www.mindscapehq.com/products/wpfelements/nightly-builds Jason Fauchelle |
|
|
Hellow Jason Thanks for help, solution for Minimum value works fine. An we have other question: MajorTickSpacing parameter works not so clear with logarithmic axis as with linear. For example with linear axis we set min/max/MajorTickSpacing to -15/60/5 and got good result (see linearAxis.png) but with logarithmic axis we set parameters to 0/130/0 and Max value (130) doesn't displayed on axis (see logAxis.png) How need to configure charts with logarithmic axis to see Min and Max values on Y axis ? |
|
|
Hello Yael If you look at your logAxis.png image, you can see some space above the top axis label. The axis is correctly being configured to show a range of 0 - 130. Did you want there to be an extra label right at the top of the axis (such as the image I attached)? If so I could add an option to always display a label at the top of the axis. Or did you want there to still only be 4 labels, but separated in a way that the fill the 0 - 13- range? (Something like 0, 3, 13, 130). This would be tricky to achieve. Jason Fauchelle |
|
|
Hello Jason Second option is more clear solution in this way. |
|
|
Hello Yael For numeric scales, the chart only supports evenly separated ticks and labels. There isn't a built in feature to spread out the labels to fill the whole size of the axis, but you can set the MajorTickSpacing property to do so. Here is how you could do it:
Here 0 is the minimum of the axis, 130 is the maximum and 4 is the desired number of tick marks (not including 0). This ensures that 130 is the top most tick. But as I mentioned, the spacing between all tick marks are the same, so you get: 0, 0.6, 3.606, 21.65, 130. Jason Fauchelle |
|
|
Hello, Jason There is other situation, when I set Min = 10, Max = 130 and StartsFromZero = false, this method not working. See attached example. |
|
|
Hello Yael Thanks for the repro project. If you set TickMarkMode to Stationary on the Y axis, you'll get the desired result. Here's why: The default value for TickMarkMode is Movable. This means that the tick marks and labels move as you zoom or pan the chart. When the minimum of the axis is 0, you see that the first tick mark is at 13. So when you pan the chart, it keeps a tick mark at 13 to get an animated effect on the axis if the user dynamically pans the chart. By setting this property to Stationary, the tick marks will always start at the bottom of Y axis and adjust the label values accordingly. Jason Fauchelle |
|
|
Hello, Jason Thank you for help. |
|