indexable.js 943 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. module.exports = {
  2. config: {
  3. type: 'line',
  4. data: {
  5. labels: [0, 1, 2, 3, 4, 5],
  6. datasets: [
  7. {
  8. // option in dataset
  9. data: [0, 5, 10, null, -10, -5],
  10. pointBackgroundColor: '#ff0000',
  11. pointBorderColor: '#ff0000',
  12. pointStyle: [
  13. 'circle',
  14. 'cross',
  15. 'crossRot',
  16. 'dash',
  17. 'line',
  18. 'rect',
  19. ]
  20. },
  21. {
  22. // option in element (fallback)
  23. data: [4, -5, -10, null, 10, 5],
  24. }
  25. ]
  26. },
  27. options: {
  28. legend: false,
  29. title: false,
  30. elements: {
  31. line: {
  32. fill: false,
  33. },
  34. point: {
  35. backgroundColor: '#00ff00',
  36. borderColor: '#00ff00',
  37. pointStyle: [
  38. 'line',
  39. 'rect',
  40. 'rectRounded',
  41. 'rectRot',
  42. 'star',
  43. 'triangle'
  44. ],
  45. radius: 10
  46. }
  47. },
  48. scales: {
  49. xAxes: [{display: false}],
  50. yAxes: [{display: false}]
  51. }
  52. }
  53. },
  54. options: {
  55. canvas: {
  56. height: 256,
  57. width: 512
  58. }
  59. }
  60. };