SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and iOS Chart & Android Chart Components
I’m new for this tool and I have a problem to display different datasets for one series dynamically.
I have a dataset name dataset1 with the range of x-axis is from 0 to 30, and the data is from 100 t0 3000. And another dataset named dataset2 with the range of x-axis is from 1 to 10, and the data is from 10 to 100.
Fistly, I load dataset to series A, then it shows as below.
Then, I load dateset2 to the same series A, it shows the series fine, but the axes are not adaptive with the x/y range as below.
My question is how can the axies be adaptive with different datasets? Appreciated for any response! Thank you!
BTW, the sample code I made is attached.
Thank you for your enquiry! It should be really simple, please take a look at our article AutoRange.Once vs. AutoRange.Never vs. AutoRange.Always
When you create a SciChartSurface with X,Y Axes, RenderableSeries and
DataSeries, the default behaviour is what we call ‘AutoRange.Once’.
This means SciChart will attempt to AutoRange on that axis until a
valid visible range has been achieved.
If you change the data, SciChart will not automatically fit the data. There are two ways you can achieve this:
Just note that zooming, panning is incompatible with option (2) above. To zoom and pan while auto-ranging you need a more complex technique, which is discussed here: How to have a fixed scrolling time range which works with modifiers
Hope this helps!
Please login first to submit.