PolarArea

气泡图。

使用

  1. <m-bubble id="myChart" width="300" height="350"
  2. data="{
  3. datasets: [{
  4. label: 'My First dataset',
  5. borderColor: 'rgb(55,99,132)',
  6. backgroundColor: 'transparent',
  7. data: [
  8. { x: 11, y: 44, v: 22 },
  9. { x: 77, y: 11, v: 11 },
  10. { x: 55, y: 22, v: 99 },
  11. { x: 44, y: 33, v: 34 },
  12. { x: 33, y: 9, v: 98 },
  13. { x: 20, y: 1, v: 1 },
  14. { x: 55, y: 3, v: 2 }
  15. ]
  16. }, {
  17. label: 'My Second dataset',
  18. borderColor: 'rgb(255,99,132)',
  19. backgroundColor: 'transparent',
  20. data: [
  21. { x: 18, y: 44, v: 22 },
  22. { x: 77, y: 21, v: 11 },
  23. { x: 55, y: 122, v: 99 },
  24. { x: 84, y: 3, v: 34 },
  25. { x: 33, y: 29, v: 98 },
  26. { x: 20, y: 111, v: 1 },
  27. { x: 55, y: 13, v: 2 }
  28. ]
  29. }]
  30. }"
  31. options="{
  32. aspectRatio: 1,
  33. legend: false,
  34. tooltips: false,
  35. elements: {
  36. point: {
  37. borderColor: '#ccc',
  38. borderWidth: 1,
  39. hoverBackgroundColor: 'transparent',
  40. hoverBorderColor: 'red',
  41. hoverBorderWidth: 2,
  42. radius: '3 + Math.abs($v)/100 * $w/24'
  43. }
  44. }
  45. }">
  46. </m-bubble>

API

Props

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