Pre loader

Value Converter for YValues

Welcome to the SciChart Forums!

  • Please read our Question Asking Guidelines for how to format a good question
  • Some reputation is required to post answers. Get up-voted to avoid the spam filter!
  • We welcome community answers and upvotes. Every Q&A improves SciChart for everyone

WPF Forums | JavaScript Forums | Android Forums | iOS Forums

0
0

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?

  • You must to post comments
0
0

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.

Thanks!
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.

Try SciChart Today

Start a trial and discover why we are the choice
of demanding developers worldwide

Start TrialCase Studies