scriptable-element-options.js 623 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. module.exports = {
  2. config: {
  3. type: 'polarArea',
  4. data: {
  5. labels: [0, 1, 2, 3, 4, 5],
  6. datasets: [
  7. {
  8. // option in element (fallback)
  9. data: [0, 2, 4, null, 6, 8],
  10. }
  11. ]
  12. },
  13. options: {
  14. legend: false,
  15. title: false,
  16. elements: {
  17. arc: {
  18. backgroundColor: 'transparent',
  19. borderColor: '#ff00ff',
  20. borderWidth: 8,
  21. borderAlign: function(ctx) {
  22. var value = ctx.dataset.data[ctx.dataIndex] || 0;
  23. return value > 4 ? 'center' : 'inner';
  24. }
  25. }
  26. },
  27. scale: {
  28. display: false
  29. }
  30. }
  31. },
  32. options: {
  33. canvas: {
  34. height: 256,
  35. width: 512
  36. }
  37. }
  38. };