I am trying to access an object as DataProvider for amcharts by using DataLoader Plugin but it will not show. Here is my JSON Output:
{
"ReportName":"This is the Report Name",
"Column-1":"This is the Report Name",
"Column-2":"This is the Report Name",
"Data":[
{"Category":"Guntur","Column_1":"20.30","Column_2":"22.34"},
{"Category":"Chittor","Column_1":"20.30","Column_2":"22.34"}
]}
This is my script for Amchart:
AmCharts.makeChart("chartdiv",
{
"type": "serial",
"categoryField": "Category",
"columnWidth": 0.72,
"angle": 15,
"depth3D": 10,
"plotAreaFillAlphas": 0.01,
"startDuration": 1,
"fontFamily": "Lato",
"dataLoader": {
"url": "chartInformation",
"format": "json"
},
"export": {
"enabled": true
},
"categoryAxis": {
"autoRotateAngle": 0,
"gridPosition": "start",
"boldLabels": true,
"labelRotation": 25.2
},
"chartScrollbar": {
"enabled": true
},
"trendLines": [],
"graphs": [
{
"balloonText": "[[category]] <br> [[title]] : [[value]]",
"fillAlphas": 1,
"id": "AmGraph-1",
"title": "Target",
"type": "column",
"valueField": "Column_1"
},
{
"balloonText": "[[category]] <br> [[title]] : [[value]]",
"fillAlphas": 1,
"id": "AmGraph-2",
"title": "Achieved",
"type": "column",
"valueField": "Column_2"
}
],
"guides": [],
"valueAxes": [
{
"id": "ValueAxis-1",
"title": "Cost in Lakhs"
}
],
"allLabels": [],
"balloon": {
"horizontalPadding": 12
},
"legend": {
"enabled": true,
"backgroundAlpha": 0.01,
"rollOverGraphAlpha": 0,
"useGraphSettings": true
},
"titles": [
{
"id": "Title-1",
"size": 15,
"text": "Opening of PMJDY Accounts"
}
]
}
);
In the url tag I'm giving the url for retrieving the json output. How can I use Data Object for chart Data?
Other data of json will be must because I want to use other Data of ReportName.