Hello,
I'm using ASP.NET Core 2.1 and trying to get a Pie chart bound to a remote datasource based on this example: https://demos.telerik.com/aspnet-core/pie-charts/remote-data-binding. I can't get anything except the "Title" to show. The pie never displays. (FYI, the pie chart works fine for hardcoded data.) I know the controller works as I'm getting response data in the format I expect. Here's some streamlined code:
Here's my view:
@(Html.Kendo().Chart<WT.Models.Cars>()
.Name("chart1")
.Title(title => title.Text("Title").Position(ChartTitlePosition.Top))
.DataSource(ds => ds.Read("CarTotals_PieChart", "Output"))
.Series(series => series.Pie(model => model.NumCars, model => model.CarManu))
)
Here's my model:
public class Cars
{
public string CarManu{ get; set; }
public int NumCars { get; set; }
}
Here's my response JSON data:
{"Data":[{"CarManu":"GM","NumCars":167},{"CarManu":"Ford","NumCars":120},{"CarManu":"Mazda","NumCars":60},{"CarManu":"Ferrari","NumCars":19}],"Total":4,"AggregateResults":null,"Errors":null}
I've seen other posts related to this exact same (issue but never a resolution. What am I doing wrong? Thanks in advance.