Doughnut

环状图。

使用

  1. <m-doughnut id="myDoughnut" width="600" height="300"
  2. data="{
  3. labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],
  4. datasets: [{
  5. label: '# of Votes',
  6. data: [12, 19, 3, 5, 2, 3],
  7. backgroundColor: [
  8. 'rgba(255,99,132,1)',
  9. 'rgba(54, 162, 235, 1)',
  10. 'rgba(255, 206, 86, 1)',
  11. 'rgba(75, 192, 192, 1)',
  12. 'rgba(153, 102, 255, 1)',
  13. 'rgba(255, 159, 64, 1)'
  14. ],
  15. borderColor: 'white',
  16. borderWidth: 1
  17. }]
  18. }"
  19. options="{
  20. responsive: true,
  21. legend: {
  22. position: 'top'
  23. },
  24. title: {
  25. display: true,
  26. text: 'Omim Doughnut Chart'
  27. },
  28. animation: {
  29. animateScale: true,
  30. animateRotate: true
  31. }
  32. }">
  33. </m-doughnut>

API

Props

  1. {
  2. data: object,
  3. options: object,
  4. width: number,
  5. height: number
  6. }