javascript - Amcharts Pie Chart show country only on hover -


in demo http://www.amcharts.com/demos/simple-pie-chart/#theme-light shows country , percent both @ first view , on hover. percent shown @ first view, , show country: percent on hover.

is possible? many help!

you can use chart property labeltext specify being shown slice labels.

to show percents, need set "[[percents]]%".

var chart = amcharts.makechart("chartdiv", {    "type": "pie",    "theme": "light",    "dataprovider": [{      "country": "lithuania",      "litres": 501.9    }, {      "country": "czech republic",      "litres": 301.9    }, {      "country": "ireland",      "litres": 201.1    }, {      "country": "germany",      "litres": 165.8    }, {      "country": "australia",      "litres": 139.9    }, {      "country": "austria",      "litres": 128.3    }, {      "country": "uk",      "litres": 99    }, {      "country": "belgium",      "litres": 60    }, {      "country": "the netherlands",      "litres": 50    }],    "valuefield": "litres",    "titlefield": "country",    "labeltext": "[[percents]]%"  });
<script src="http://www.amcharts.com/lib/3/amcharts.js"></script>  <script src="http://www.amcharts.com/lib/3/pie.js"></script>  <script src="http://www.amcharts.com/lib/3/themes/light.js"></script>  <div id="chartdiv" style="width: 100%; height: 350px;"></div>


Comments

Popular posts from this blog

html - Outlook 2010 Anchor (url/address/link) -

javascript - Why does running this loop 9 times take 100x longer than running it 8 times? -

Getting gateway time-out Rails app with Nginx + Puma running on Digital Ocean -