Scatter

散点图。

使用

  1. <m-scatter id="myScatter" width="600" height="300" data=" {
  2. datasets: [{
  3. label: 'My First dataset',
  4. borderColor: 'rgb(255, 99, 132)',
  5. backgroundColor: 'rgba(255, 99, 132, .2)',
  6. data: [{
  7. x: 50,
  8. y: 32
  9. }, {
  10. x: 22,
  11. y: 10
  12. }, {
  13. x: 80,
  14. y: 44
  15. }, {
  16. x: 22,
  17. y: 77
  18. }, {
  19. x: 3,
  20. y: 9
  21. }, {
  22. x: 44,
  23. y: 11
  24. }, {
  25. x: 12,
  26. y: 100
  27. }]
  28. }, {
  29. label: 'My Second dataset',
  30. borderColor: 'rgb(54, 162, 235)',
  31. backgroundColor: 'rgba(54, 162, 235, .2)',
  32. data: [{
  33. x: 20,
  34. y: 132
  35. }, {
  36. x: 32,
  37. y: 40
  38. }, {
  39. x: 80,
  40. y: 84
  41. }, {
  42. x: 32,
  43. y: 77
  44. }, {
  45. x: 13,
  46. y: 9
  47. }, {
  48. x: 24,
  49. y: 11
  50. }, {
  51. x: 12,
  52. y: 60
  53. }]
  54. }]
  55. }"
  56. options="{
  57. title: {
  58. display: true,
  59. text: 'Omim Scatter Chart'
  60. }
  61. }">
  62. </m-scatter>

API

Props

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