radius-scriptable.js 640 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. module.exports = {
  2. config: {
  3. type: 'bubble',
  4. data: {
  5. datasets: [{
  6. data: [
  7. {x: 0, y: 0},
  8. {x: 1, y: 0},
  9. {x: 2, y: 0},
  10. {x: 3, y: 0},
  11. {x: 4, y: 0},
  12. {x: 5, y: 0}
  13. ],
  14. radius: function(ctx) {
  15. return ctx.dataset.data[ctx.dataIndex].x * 4;
  16. }
  17. }]
  18. },
  19. options: {
  20. legend: false,
  21. title: false,
  22. scales: {
  23. xAxes: [{display: false}],
  24. yAxes: [{display: false}]
  25. },
  26. elements: {
  27. point: {
  28. backgroundColor: '#444'
  29. }
  30. },
  31. layout: {
  32. padding: {
  33. left: 24,
  34. right: 24
  35. }
  36. }
  37. }
  38. },
  39. options: {
  40. canvas: {
  41. height: 128,
  42. width: 256
  43. }
  44. }
  45. };