Pre loader

Mountain chart change fill color when over a value

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 trying to figure out the best approach to this. Basically I have line series which is defining a limit, may only have points at X=0 & max rather than individual points. My 2nd value I want to fill with one color when it’s below that limit and if it goes above the limit then only the portion above that limit should be colored differently (blue in example).

Anybody able to set me on the right track for this? I can think of ways to do it if I break the 2nd value up and display as two series (would basically be a stacked mountain then. and just limit one to not go above the limit value. Is there a way to avoid breaking this up to separate series and just style it?

Chart example

Version
5
  • You must to post comments
0
0

You can use the PaletteProvider API to fill a mountain series if the value is over a threshold. Have a look at the documentation for the PaletteProvider here.

However it won’t quite do what you want. The PaletteProvider fills a mountain segment like this:

enter image description here

What you want is to fill juse the part that exceeds a threshold. You might have to consider either:

1.) A custom series
or
2.) using the Band Series to fill the area between two lines

Note you can set Stroke1, Stroke2, Fill1, Fill2 to transparent if you want to display just a polygon when one value exceeds another

Best regards,
Andrew

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.