constants.js 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. "use strict";
  2. var _a;
  3. Object.defineProperty(exports, "__esModule", { value: true });
  4. exports.DEFAULT_OPTIONS = exports.RANGE_VIEW_ID = exports.INDICATEOR_VIEW_ID = exports.DEFAULT_COLOR = exports.PERCENT = exports.RANGE_TYPE = exports.RANGE_VALUE = void 0;
  5. exports.RANGE_VALUE = 'range';
  6. exports.RANGE_TYPE = 'type';
  7. exports.PERCENT = 'percent';
  8. exports.DEFAULT_COLOR = '#f0f0f0';
  9. /** 仪表盘由 指针和表盘 组成 */
  10. exports.INDICATEOR_VIEW_ID = 'indicator-view';
  11. exports.RANGE_VIEW_ID = 'range-view';
  12. /**
  13. * 仪表盘默认配置项
  14. */
  15. exports.DEFAULT_OPTIONS = {
  16. percent: 0,
  17. range: {
  18. ticks: [],
  19. },
  20. innerRadius: 0.9,
  21. radius: 0.95,
  22. startAngle: (-7 / 6) * Math.PI,
  23. endAngle: (1 / 6) * Math.PI,
  24. syncViewPadding: true,
  25. axis: {
  26. line: null,
  27. label: {
  28. offset: -24,
  29. style: {
  30. textAlign: 'center',
  31. textBaseline: 'middle',
  32. },
  33. },
  34. subTickLine: {
  35. length: -8,
  36. },
  37. tickLine: {
  38. length: -12,
  39. },
  40. grid: null,
  41. },
  42. indicator: {
  43. pointer: {
  44. style: {
  45. lineWidth: 5,
  46. lineCap: 'round',
  47. },
  48. },
  49. pin: {
  50. style: {
  51. r: 9.75,
  52. lineWidth: 4.5,
  53. fill: '#fff',
  54. },
  55. },
  56. },
  57. statistic: {
  58. title: false,
  59. },
  60. meta: (_a = {},
  61. // 两个 view 的 scale 同步到 v 上
  62. _a[exports.RANGE_VALUE] = {
  63. sync: 'v',
  64. },
  65. _a[exports.PERCENT] = {
  66. sync: 'v',
  67. tickCount: 5,
  68. tickInterval: 0.2,
  69. },
  70. _a),
  71. animation: false,
  72. };
  73. //# sourceMappingURL=constants.js.map