I’m trying to bind dynamic data to Apex Charts series but values are not rendering in chart. My code
[WebMethod]
public static List<object> GetRequestsCount()
{
List<object> chartData = new List<object>();
List<int> totalCount = new List<int>();
totalCount.Add(99);
chartData.Add(totalCount.ToArray());
return chartData;
}
`$(function () {
“use strict”;
// chart 1
$.ajax({
type: "POST",
url: '../portaldashboard.aspx/GetRequestsCount',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccess_,
error: OnErrorCall_
});
function OnErrorCall_(repo) {
alert(repo);
}
function OnSuccess_(reponse) {
var aData = reponse.d;
alert(reponse.d); // value is appearing in popup
console.log(aData[1]);
var options = {
series: aData[1],
chart: {
height: 180,
type: 'radialBar',
toolbar: {
show: false
}
},'
Kindly help in binding the data to chart from C#.