My HTML code is like this :
My Javascript code is like this :
You need to specify the theme
option while initializing as below and also make use of makeChart
directly instead of Amcharts.AmPieChart()
. Your updated code would be:
AmCharts.makeChart("chartdiv", {
"type": "pie",
"theme": "light",
"dataProvider": chartData,
"valueField": "litres",
"titleField": "country",
"export": {
"enabled": true
}
});
UPDATED FIDDLE