Pre loader

Points in a series of different colours?

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’m rendering an XyDataSeries chart, with the series data being populated by a view model. The VM also has an array of “metadata” objects (one per series point), and I would like to change the colour of each point based on a property value in that point’s metadata object (e.g. true=blue, false=red). What’s the best approach?

I thought about using two series – one for blue and one for red – the VM adds each point to the appropriate series based on its metadata, but thought I’d ask first in case there was a slicker solution, e.g. using bindings.

  • You must to post comments
0
0

Hi,

No, unfortunately, this doesn’t work with XyScatterRenderableSeries now. That’s because PointMarkers are rendered as bitmaps so binding won’t work. You could try to implement CustomRenderableSeries and implelement desired behavior there. But seems your solution(having separate series and append/remove points dynamically) seems to be the best for now.

Best regards,
Yuriy

  • 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