SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, and now iOS Charting & Android Chart Components

Welcome to the SciChart Community Forums!

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!

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.