Hi Supporter!
I using Chart JavaScript, after ajax success return, json include chart render:
"commonSeriesOptions:
{
type: 'bar',
enableAnimation: true,
tooltip:{visible:true, format: "#series.name# <br/> #point.x# : #point.y#"},
marker:
{
dataLabel:
{
font: { size:'13px',fontFamily:'Segoe UI',fontStyle:'Normal',fontWeight:'regular'},
textPosition: 'top',
horizontalTextAlignment:"near",
visible:true
},
}
},
//Initializing Series
series:
[
{
points: [{ x: 2006, y: 7.8 }, { x: 2007, y: 7.2}, { x: 2008, y: 6.8 }, { x: 2009, y: 10.7 },
{ x: 2010, y: 10.8}, { x: 2011, y: 9.8 }],
name: 'India'
},
{
points: [{ x: 2006, y: 4.8 }, { x: 2007, y: 4.6 }, { x: 2008, y: 7.2 }, { x: 2009, y: 9.3 },
{ x: 2010, y: 9.7}, { x: 2011, y: 9 }],
name: 'US'
}
],
load:"loadTheme",
displayTextRendering:"OndataLabel",
isResponsive: true,
showTooltip: true,
title:{text: 'Unemployment rate (%)'},
size: { height: "600" },
legend: { visible: true, position: 'right', alignment:"near" }"
I call chart:
$.ajax({
type: "GET",
url: '@Url.Action("RedenChart")',
data: {"typeReport": typeReport, "typeKPI": typeKPI, "sTimeStart": sTimeStart, "sTimeEnd":sTimeEnd},
async: true,
dataType: "json",
contentType: "application/json;charset=utf-8",
success: function (data) {
$("#chart0").ejChart(data) },
});
But notworking, please help me!
Thanks