anchor-presets-arc.js 590 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. var datasets = [];
  2. ['end', 'center', 'start'].forEach(function(anchor) {
  3. datasets.push({
  4. data: [0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1],
  5. datalabels: {
  6. anchor: anchor
  7. }
  8. });
  9. });
  10. export default {
  11. config: {
  12. type: 'doughnut',
  13. data: {
  14. datasets: datasets
  15. },
  16. options: {
  17. cutoutPercentage: 50,
  18. layout: {
  19. padding: 16
  20. },
  21. plugins: {
  22. datalabels: {
  23. backgroundColor: '#00ff77',
  24. borderColor: 'black',
  25. borderWidth: 2,
  26. font: {
  27. size: 0
  28. },
  29. padding: 8
  30. }
  31. }
  32. }
  33. },
  34. options: {
  35. canvas: {
  36. height: 512,
  37. width: 512
  38. }
  39. }
  40. };