Dear Customer,
Thanks for using Syncfusion products.
At present we are not having TimeSpanAxis support for chart secondary axis. However we have meet your requirement in workaround by converting TimeSpan value to double. Please find the sample in the below location.
Sample: TimeSpan_Sample.zip
Please let us know if have any queries.
Regards,
M.Sheik
<chart:SfChart.SecondaryAxis>
<chart:TimeSpanAxis LabelCreated="NumericalAxis_LabelCreated" >
</chart:TimeSpanAxis>
</chart:SfChart.SecondaryAxis> |
private void NumericalAxis_LabelCreated(object sender, LabelCreatedEventArgs e)
{
TimeSpan Value = TimeSpan.Parse(e.AxisLabel.LabelContent as string);
DateTime date = (new DateTime(1970, 1, 1).AddMilliseconds(Value.TotalMilliseconds));
e.AxisLabel.LabelContent = String.Format("{0:HH:mm}", date);
}
|