I have a Kendo chart looking like:
@(Html.Kendo().Chart<SchoolYearWorkScheduleModel>()
.Name("chart")
.Title("Beskæftigelses Graf")
.Legend(legend => legend
.Position(ChartLegendPosition.Left)
)
.DataSource(ds => ds.Read(read => read.Action("Read", "EmploymentGraph")))
.Series(series =>
{
series.Line(model => model.TotalWorkHours).Name("Total Beskæftigelse").Markers(z => z.Visible(false)).Style(ChartLineStyle.Normal);
...
CONTROLLER:
[HttpPost]
public ActionResult Read()
{
var res = _schoolYearWorkScheduleRepository.GetModel();
return Json(res);
}
Repository:
public SchoolYearWorkScheduleModel GetModel()
{
schoolYearWorkScheduleModel.ID = DateTime.Now.SchoolYear();
schoolYearWorkScheduleModel.TotalWorkHours = TotalWorkHours(DateTime.Now, 1);
return schoolYearWorkScheduleModel;
}
The Json result that the controller Read method returns gives me the data, that it should. But nothing at all shows up in the chart graph. And I cannot see what I am doing wrong. ?