I have a sample AmCharts solid gauge charts and I want to render it using the values from the Category and Size textboxes. For example , the textarea will have this JSON data ,
[
{
"Country":"Malaysia",
"Size":260,
"State":"Selangor",
"Population":450
},
{
"Country":"England",
"Size":140,
"State":"Liverpool",
"Population":100
},
{
"Country":"China",
"Size":250,
"State":"Beijing",
"Population":200
},
{
"Country":"South Korea",
"Size":360,
"State":"Seoul",
"Population":300
}
]
Then I set Category to be Country , so it loads 4 axes with 4 labels.
Then I set Size to be Population , so it loads the endValue(startValue starts from 0 right?) to be that. And the percentage is derived from maxValue * 1.2.
My main question is , How do I render a gauge chart using AmCharts with custom data configuration? dataProvider does not seem to work here like it does in serial charts.
Codepen link : https://codepen.io/ariff20/pen/WaKJRV
dataProviderdoes not exist in gauge charts. You need to change your approach so that you dynamically convert your data into axes and arrow values. Just map them into the appropriate objects instead of creating a dataProvider-style array. - xorspark