anchor-indexable.js 529 B

12345678910111213141516171819202122232425262728293031323334353637
  1. export default {
  2. config: {
  3. type: 'bar',
  4. data: {
  5. labels: [0, 1, 2, 3, 4],
  6. datasets: [{
  7. data: [1, 1, 1, 1, 1],
  8. datalabels: {
  9. backgroundColor: '#00ff77'
  10. }
  11. }]
  12. },
  13. options: {
  14. layout: {
  15. padding: 16
  16. },
  17. plugins: {
  18. datalabels: {
  19. anchor: ['start', 'center', 'end', 'center', 'start'],
  20. borderColor: 'black',
  21. borderWidth: 2,
  22. font: {
  23. size: 0
  24. },
  25. offset: 0,
  26. padding: 8
  27. }
  28. }
  29. }
  30. },
  31. options: {
  32. canvas: {
  33. height: 256,
  34. width: 256
  35. }
  36. }
  37. };