SciChart® the market leader in Fast WPF Charts, WPF 3D Charts, iOS Chart, Android Chart and JavaScript Chart Components
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
Please login first to submit.