Below is my code. Kendo chart is taking my date time data and displaying the axis by date not date and time. I've tried many ways to get this to work. When I tried Labels(labels => labels.DateFormats(formats => formats.Days("dd/MM/yyyy hh tt"))) and it displays all dates as 12 AM. Why wont it display my data on the axis natively without formatting? It seems to convert the data to a day range defaulted to 12 AM. What am I doing wrong?
Data is like:
8/24/2017 1:00
8/24/2017 2:00
8/24/2017 3:00
@(Html.Kendo().Chart<ElmahErrorsHourCountModel>()
.Name("HourlyErrorTotals")
.DataSource(ds => ds.Read(read => read.Action("HourlyErrorsCountByDate_Read", "Grid")))
.HtmlAttributes(new { style = "height:225px; width= 100%" })
.Series(series =>
{
series
.Line(model => model.ErrorCount);
})
.CategoryAxis(axis => axis
.Categories(model => model.HourlyDateTime)
.Labels(label => label.Rotation(-90))
.Crosshair(c => c.Visible(true))
)
.ValueAxis(axis => axis.Numeric()
.Labels(labels => labels.Format("{0:N0}"))
)
.Tooltip(tooltip => tooltip
.Visible(true)
.Shared(true)
.Format("{0:N0}")
)
)