SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components
Please use the forums below to ask questions about SciChart. Take a moment to read our Question asking guidelines on how to ask a good question and our support policy. We also have a tag=SciChart on Stackoverflow.com where you can earn rep for your questions!
Please note: SciChart team will only answer questions from customers with active support subscriptions. Expired support questions will be ignored. If your support status shows incorrectly, contact us and we will be glad to help.
I am using a setting pretty similar to the one in the RealTimeCursor.xaml part of the demo project, with the difference that I implement MVVM and the data series come from my view model.
So basically I have a chart with multiple FastLineRenderableSeries, which use XyDataSeries as data series. These series are updated dynamically, to reflect changes in the model properties they represent. My problem is the user should be able to change the unit of the property which is charted by any of those series during runtime. For instance we start with speed in m/s and he changes it to km/h. Then the chart should also show the speed series in km/h. I looked for a way to attach a converter either to the values of the XyDataSeries, or to the YAxis, some built in method which would help me change the visual representation of the series to reflect the unit change.But I didn’t find anything of this sort.
Is there a smart way to do this?Or every time the unit is changed I need to create a new series with the values being converted to the proper unit?
I think what you’re looking for is the LabelProvider feature.
It acts like a ValueConverter for YAxis or XAxis Labels, but has some additional functionality, such as the ability to create custom data-contexts for labels, and format both cursor and axis labels.
Take a look at the above, it should answer your question.
Please login first to submit.