The Value Axis isn't showing a DateTime like '5/1/2023 10:00 AM' which is the same DateTime format that the data from my stored procedure is using. I'd like the value axis to show each hour of the day.
Attached is a screenshot of the grid. Thanks!
Here's the chart's code:
@(Html.Kendo().Chart<BatchPlantHourlyOutputViewModel>().Name("chart")
.Title("Planned Pour Delivery Times vs Actual Pour Delivery Times")
.Legend(legend => legend
.Visible(true)
.Position(ChartLegendPosition.Bottom)
)
.DataSource(dataSource => dataSource
.Read(read => read.Action("GetBatchPlantHourlyOutputGraph", "Production")
.Data("PSW.UI.getSelectedInputVals(false)")))
.Events(e => e.DataBound("PSW.Events.Graph.onBatchPlantHourlyOutputGraphDataBound"))
.Series(series =>
{
series.Line(model => model.ScheduledHour)
.Name("Scheduled Time");
series.Line(model => model.StartTime)
.Name("Actual Time");
})
.CategoryAxis(axis => axis
.Categories(model => model.Output)
.MajorGridLines(lines => lines.Visible(true))
)
.ValueAxis(axis => axis
.Date()
.Labels(labels => labels.Format("{0:MM/dd/yyyy hh:mm:ss}"))
.Line(line => line.Visible(false))
)
)