Hi Arif,
Thanks for using syncfusion products,
We have analyzed your query and as for your requirement we have prepared a sample. In that sample, we are getting data using ajax, sample is working fine at our end. We have noticed your code snippet, revenue is data collection but you are trying to get revenue.year. So we suspect that is reason for sample is not working. Please find the below code snippet to achieve this requirement,
$.ajax({ type: "POST", url: "Home/Getjsondata", data: {}, dataType: "json", async: false, success: function (revenue) { var chartData = revenue; //here revenue is a array collection, so i have assigned directly to chart data source. $("#container").ejChart({ series: [{ type: 'line', dataSource: chartData, xName: "Year", yName: "Total" }] }) } }); |
Screenshot:
Sample for your reference can be find from the below link,
Kindly revert us, if you have any concerns.
Thanks,
Baby