constant.js 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.CLASS_NAMES = exports.HELIX_DEFAULT_OPTIONS = exports.ARC_DEFAULT_OPTIONS = exports.AXIS_BASE_DEFAULT_ATTR = void 0;
  4. var util_1 = require("@antv/util");
  5. var shapes_1 = require("../../shapes");
  6. var util_2 = require("../../util");
  7. exports.AXIS_BASE_DEFAULT_ATTR = {
  8. data: [],
  9. animate: {
  10. enter: false,
  11. update: {
  12. duration: 100,
  13. easing: 'ease-in-out-sine',
  14. fill: 'both',
  15. },
  16. exit: {
  17. duration: 100,
  18. fill: 'both',
  19. },
  20. },
  21. showArrow: true,
  22. showGrid: true,
  23. showLabel: true,
  24. showLine: true,
  25. showTick: true,
  26. showTitle: true,
  27. showTrunc: false,
  28. dataThreshold: 100,
  29. lineLineWidth: 1,
  30. lineStroke: 'black',
  31. crossPadding: 10,
  32. titleFill: 'black',
  33. titleFontSize: 12,
  34. titlePosition: 'lb',
  35. titleSpacing: 0,
  36. titleTextAlign: 'center',
  37. titleTextBaseline: 'middle',
  38. lineArrow: function () {
  39. return new shapes_1.Path({
  40. style: {
  41. path: [['M', 10, 10], ['L', -10, 0], ['L', 10, -10], ['L', 0, 0], ['L', 10, 10], ['Z']],
  42. anchor: '0.5 0.5',
  43. fill: 'black',
  44. transformOrigin: 'center',
  45. },
  46. });
  47. },
  48. labelAlign: 'parallel',
  49. labelDirection: 'positive',
  50. labelFontSize: 12,
  51. labelSpacing: 0,
  52. gridConnect: 'line',
  53. gridControlAngles: [],
  54. gridDirection: 'positive',
  55. gridLength: 0,
  56. gridType: 'segment',
  57. lineArrowOffset: 15,
  58. lineArrowSize: 10,
  59. tickDirection: 'positive',
  60. tickLength: 5,
  61. tickLineWidth: 1,
  62. tickStroke: 'black',
  63. tickStrokeOpacity: 0.65,
  64. labelOverlap: [
  65. // { type: 'rotate', optionalAngles: [0, 45, 90] },
  66. // { type: 'ellipsis', suffix: '...', minLength: 14, maxLength: 160 },
  67. // { type: 'hide' },
  68. ],
  69. };
  70. exports.ARC_DEFAULT_OPTIONS = (0, util_1.deepMix)({}, exports.AXIS_BASE_DEFAULT_ATTR, {
  71. style: {
  72. type: 'arc',
  73. },
  74. });
  75. exports.HELIX_DEFAULT_OPTIONS = (0, util_1.deepMix)({}, exports.AXIS_BASE_DEFAULT_ATTR, {
  76. style: {},
  77. });
  78. exports.CLASS_NAMES = (0, util_2.classNames)({
  79. mainGroup: 'main-group',
  80. gridGroup: 'grid-group',
  81. grid: 'grid',
  82. lineGroup: 'line-group',
  83. line: 'line',
  84. tickGroup: 'tick-group',
  85. tick: 'tick',
  86. tickItem: 'tick-item',
  87. labelGroup: 'label-group',
  88. label: 'label',
  89. labelItem: 'label-item',
  90. titleGroup: 'title-group',
  91. title: 'title',
  92. lineFirst: 'line-first',
  93. lineSecond: 'line-second',
  94. }, 'axis');
  95. //# sourceMappingURL=constant.js.map