bar-thickness-flex-offset.json 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. {
  2. "config": {
  3. "type": "bar",
  4. "data": {
  5. "labels": ["2017", "2018", "2020", "2024", "2038"],
  6. "datasets": [{
  7. "backgroundColor": "#FF6384",
  8. "data": [1, null, 3, 4, 5]
  9. }]
  10. },
  11. "options": {
  12. "responsive": false,
  13. "legend": false,
  14. "title": false,
  15. "scales": {
  16. "xAxes": [{
  17. "type": "time",
  18. "offset": true,
  19. "display": false,
  20. "barPercentage": 1,
  21. "categoryPercentage": 1,
  22. "barThickness": "flex",
  23. "time": {
  24. "parser": "YYYY"
  25. },
  26. "ticks": {
  27. "source": "labels"
  28. }
  29. }],
  30. "yAxes": [{
  31. "display": false,
  32. "ticks": {
  33. "beginAtZero": true
  34. }
  35. }]
  36. }
  37. }
  38. },
  39. "options": {
  40. "canvas": {
  41. "height": 256,
  42. "width": 512
  43. }
  44. }
  45. }