Hi Byron,
Greetings from Syncfusion.
By default, y axis supports double and logarithmic value
types alone. To achieve your required scenario, we suggest you to specify the
datasource y value in milliseconds and convert the axis labels in OnAxisLabelRender
event in required datetime format. We have prepared sample based on your
requirement. Please check with the below snippet and sample.
|
<SfChart IsTransposed="true">
<ChartEvents OnAxisLabelRender="AxisLabelEvent"></ChartEvents>
</SfChart>
@code {
protected override void
OnInitialized()
{
base.OnInitialized();
foreach (var data in ChartPoints)
{
data.lowTemp = (DateTime.Now - data.IND_LowTemp).TotalMilliseconds;
data.highTemp = (DateTime.Now - data.IND_HighTemp).TotalMilliseconds;
}
}
public void
AxisLabelEvent(AxisLabelRenderEventArgs args)
{
if
(args.Axis.Name == "PrimaryYAxis")
{
args.Text = ((new DateTime(1970, 1,
1)).AddMilliseconds(args.Value)).ToString("HH:mm");
}
}
}
|

Sample : https://blazorplayground.syncfusion.com/BDrztWtfqbjUPqQz
Kindly revert us if you have any concerns.
Regards,
Durga Gopalakrishnan.