I've been attempting to implement the dataloader
feature on ammap without success.
Here is my current approach:
var birth_map = AmCharts.makeChart( "il_bazinda_dogum_say_dagilim", {
"type": "map",
"data": {
"map": "turkeyLow"
},
"theme": "light",
"colorSteps": 10,
"dataLoader": {
"url": "/birth/calculate_birth_frequency_data_by_province",
"format": "json",
"showErrors": true
},
"areasSettings": {
"autoZoom": false,
"balloonText": "[[value]]",
"selectable":true
},
"valueLegend": {
"right": 10,
"minValue": "Minimum",
"maxValue": "Maximum"
},
"export": {
"enabled": true,
"fileName":"Birth Numbers by Province"
}
} );
The json url seems to be returning data correctly, for example:
[{"id":"TR-01","ndogum":1111,"mdogum":22,"sdogum":693,"pdogum":336,"total":2162},{"id":"TR-02","ndogum":423,"mdogum":0,"sdogum":325,"pdogum":147,"total":895},{"id":"TR-03","ndogum":199,"mdogum":1,"sdogum":113,"pdogum":42,"total":355},{"id":"TR-04","ndogum":681,"mdogum":17,"sdogum":180,"pdogum":117,"total":995}]
I aim to utilize the total
as a value on the map.
Can anyone guide me on how to effectively use the dataloader
with ammap?
Appreciate any help!