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, Jason I have next situation: chart displays one bar series and one line series with fixed min/max values for X axis. But when line series data changes, X axis min value changes too (see attached pictures and repo project). Best regards |
|
|
Hi Yael, Thanks for the repro project. I've made a candidate fix for this which will be available in the next nightly build. This is very experimental, so please check all/any other charts you have in your application to make sure the axes are behaving as you'd expect. -Jason Fauchelle |
|
|
Hello, Jason Can you clarify, when will be available next nightly build ? Best regards |
|
|
Hello Yael, Thanks for mentioning this, the builds stopped a little while ago. The nightly build that you'll want will be available in about 10 hours from now. -Jason Fauchelle |
|
|
Hello, Jason I found some regression after your fix (see attached picture and repro project). Such bug happens when LineSeries data contains only two points. Best regards |
|
|
Hi Yael, Thanks for the additional repro project. Here is an explanation of the issue, and below is the solution. The issue here is that the chart is displaying a BarSeries (Best used with AxisLabelLayout.Inside) and a LineSeries (Best used with AxisLabelLayout.Normal) and each series has a different minimum data interval. As the BarSeries is present, the axis automatically uses AxisLabelLayout.Inside which pushes the labels inside so that bars are displayed better (not falling outside the viewport). In order to calculate how far to push the labels in, the chart looks at the minimum data interval of each series, and uses the smallest of those. This means that if new series are added, or data is changed in a way that the smallest data interval is changed, the pushed amount of the labels will change. To avoid this, I've reverted my previous change, and added a ChartAxis.LogicalPadding property. This will allow you to override the logical pushed amount of the labels when using AxisLabelLayout.Inside. Generally, you'll want to set this to be the minimum data interval of your BarSeries - in the case of your repro, that will be 1. Feel free to try different values, or come up with a good way to calculate an ideal value for any of your data sets. As long as you set this property greater than 0, the labels won't move around when you add/change data series. This will be available in the next nightly build. Let me know if you have any questions about it. -Jason Fauchelle |
|
|
Hello, Jason Thank you for help, now it works fine. Best regards |
|