indexable-object.js 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. module.exports = {
  2. config: {
  3. type: 'bar',
  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. borderSkipped: false,
  11. borderWidth: [
  12. {},
  13. {bottom: 1, left: 1, top: 1, right: 1},
  14. {bottom: 1, left: 2, top: 1, right: 2},
  15. {bottom: 1, left: 3, top: 1, right: 3},
  16. {bottom: 1, left: 4, top: 1, right: 4},
  17. {bottom: 1, left: 5, top: 1, right: 5}
  18. ]
  19. },
  20. {
  21. // option in element (fallback)
  22. data: [0, 5, 10, null, -10, -5],
  23. }
  24. ]
  25. },
  26. options: {
  27. legend: false,
  28. title: false,
  29. elements: {
  30. rectangle: {
  31. backgroundColor: 'transparent',
  32. borderColor: '#80808080',
  33. borderSkipped: false,
  34. borderWidth: [
  35. {bottom: 1, left: 5, top: 1, right: 5},
  36. {bottom: 1, left: 4, top: 1, right: 4},
  37. {bottom: 1, left: 3, top: 1, right: 3},
  38. {bottom: 1, left: 2, top: 1, right: 2},
  39. {bottom: 1, left: 1, top: 1, right: 1},
  40. {}
  41. ]
  42. }
  43. },
  44. scales: {
  45. xAxes: [{display: false}],
  46. yAxes: [{display: false}]
  47. }
  48. }
  49. },
  50. options: {
  51. canvas: {
  52. height: 256,
  53. width: 512
  54. }
  55. }
  56. };