Advertisement
Guest User

PieChart

a guest
Oct 17th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. // Create pie series
  2. "series": [{
  3. "type": "PieSeries",
  4. "dataFields": {
  5. "value": "litres",
  6. "category": "country"
  7. }
  8. }],
  9.  
  10. // Add data
  11. "data": [{
  12. "country": "Lithuania",
  13. "litres": 501.9
  14. }, {
  15. "country": "Czech Republic",
  16. "litres": 301.9
  17. }, {
  18. "country": "Ireland",
  19. "litres": 201.1
  20. }, {
  21. "country": "Germany",
  22. "litres": 165.8
  23. }, {
  24. "country": "Australia",
  25. "litres": 139.9
  26. }, {
  27. "country": "Austria",
  28. "litres": 128.3
  29. }, {
  30. "country": "UK",
  31. "litres": 99
  32. }, {
  33. "country": "Belgium",
  34. "litres": 60
  35. }, {
  36. "country": "The Netherlands",
  37. "litres": 50
  38. }],
  39.  
  40. // And, for a good measure, let's add a legend
  41. "legend": {}
  42.  
  43. }, "chartdiv", am4charts.PieChart);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement