I must have a setting incorrect or am missing something arbitrary. I can't get graphs to work with remote data. If I hard-code data in, all is well. If I use a grid with remote data, things are fine. But graphs with remote data produce an empty graph. What am I missing?
<div>
@*Graph with Remote Data -- Doesn't work!*@
@(Html.Kendo().Chart<Convergent.Web.Models.JDL.JDLModel>()
.Name("jdlGraphRemote")
.DataSource(ds => ds
.Read(r => r.Action("JDLRead", "JDL"))
)
.Series(series =>
{
series.Line(c => c.InfluenceStyleTotalDPct);
})
)
@*Graph with Direct Data -- WORKS!*@
@(Html.Kendo().Chart<Convergent.Web.Models.JDL.JDLModel>()
.Name("jdlGraphDirect")
.DataSource(ds => ds
.Read(r => r.Action("JDLRead", "JDL"))
)
.Series(series =>
{
series.Line(new double[] { 30, 0, 13, 55, 35, 0, 42, 65, 0, 0, 7, 85, 28, 35, 68, 45, 0, 42, 68, 40, 96, 58, 5, 68, 58, 75 });
})
)
@*Grid with Remote Data -- WORKS!*@
@(Html.Kendo().Grid<Convergent.Web.Models.JDL.JDLModel>()
.Name("jdlGridRemote")
.DataSource(ds => ds
.Ajax()
.Read(r => r.Action("JDLRead", "JDL"))
)
.Columns(columns =>
{
columns.Bound(c => c.InfluenceStyleTotalDPct);
})
)
</div>
<div>
@*Graph with Remote Data -- Doesn't work!*@
@(Html.Kendo().Chart<Convergent.Web.Models.JDL.JDLModel>()
.Name("jdlGraphRemote")
.DataSource(ds => ds
.Read(r => r.Action("JDLRead", "JDL"))
)
.Series(series =>
{
series.Line(c => c.InfluenceStyleTotalDPct);
})
)
@*Graph with Direct Data -- WORKS!*@
@(Html.Kendo().Chart<Convergent.Web.Models.JDL.JDLModel>()
.Name("jdlGraphDirect")
.DataSource(ds => ds
.Read(r => r.Action("JDLRead", "JDL"))
)
.Series(series =>
{
series.Line(new double[] { 30, 0, 13, 55, 35, 0, 42, 65, 0, 0, 7, 85, 28, 35, 68, 45, 0, 42, 68, 40, 96, 58, 5, 68, 58, 75 });
})
)
@*Grid with Remote Data -- WORKS!*@
@(Html.Kendo().Grid<Convergent.Web.Models.JDL.JDLModel>()
.Name("jdlGridRemote")
.DataSource(ds => ds
.Ajax()
.Read(r => r.Action("JDLRead", "JDL"))
)
.Columns(columns =>
{
columns.Bound(c => c.InfluenceStyleTotalDPct);
})
)
</div>