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

0
0

Hi,

Is it possible to add timespan Axis?

  • You must to post comments
0
0

Hi there,

SciChart now supports a TimeSpanAxis out of the box. To include it on your chart surface, please use the following code:

<s:SciChartSurface>
    <s:SciChartSurface.XAxis>
        <s:TimeSpanAxis/>
    </s:SciChartSurface.XAxis>

    <s:SciChartSurface.YAxis>
        <s:NumericAxis/>
    </s:SciChartSurface.YAxis>
</s:SciChartSurface>

Also, you will need to declare DataSeries with a TimeSpan for X-type:

var dataSeries = new XyDataSeries<TimeSpan, double>();
dataSeries.Append(TimeSpan.FromSeconds(1), 123);
dataSeries.Append(TimeSpan.FromSeconds(2), 456);

Best regards,
Yuriy

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.