Pre loader

Using IPaletteProvider in v3.42 with axis type other than 'double'

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

Answered
0
0

Hi,

I’m using Scichart v3.2, to draw scatter & line series, where the x-axis is a date (DateTime).
The requirement is that a certain x-range of each series will be drawn with a different color than the rest of the series.
However, the method signature in the API only allows axes of type ‘double’:

    Color? GetColor(IRenderableSeries series, double xValue, double yValue)

So is it still possible in some way?
If not, what would be the best way (also performance-wise) to achieve this?

P.S. As I understand that in version 4.x the API was refactored and seems to allow this, but at the moment we cannot upgrade the version.

Thanks.

Version
3.42.0.6778
  • You must to post comments
Best Answer
1
0

Yes it is possible, you just need to perform a conversion as follows:

 Color? GetColor(IRenderableSeries series, double xValue, double yValue)
 {
     DateTime xDate = new DateTime((long)xValue);
 }

That should do it!

Best regards,
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