chart-area-clip.js 597 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. module.exports = {
  2. config: {
  3. type: 'bar',
  4. data: {
  5. labels: [0, 1, 3, 4],
  6. datasets: [
  7. {
  8. data: [5, 20, -5, -20],
  9. borderColor: '#ff0000'
  10. }
  11. ]
  12. },
  13. options: {
  14. legend: false,
  15. title: false,
  16. layout: {
  17. padding: {
  18. left: 0,
  19. right: 0,
  20. top: 50,
  21. bottom: 50
  22. }
  23. },
  24. elements: {
  25. rectangle: {
  26. backgroundColor: '#00ff00',
  27. borderWidth: 8
  28. }
  29. },
  30. scales: {
  31. xAxes: [{display: false}],
  32. yAxes: [{display: false, ticks: {min: -10, max: 10}}]
  33. }
  34. }
  35. },
  36. options: {
  37. canvas: {
  38. height: 256,
  39. width: 512
  40. }
  41. }
  42. };