@visactor/vchart 1.2.0-beta.2 → 1.2.0-beta.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (155) hide show
  1. package/build/index.js +275 -129
  2. package/build/index.min.js +1 -1
  3. package/cjs/chart/waterfall/waterfall.js +1 -0
  4. package/cjs/chart/waterfall/waterfall.js.map +1 -1
  5. package/cjs/component/axis/cartesian/index.d.ts +1 -0
  6. package/cjs/component/axis/cartesian/index.js +1 -1
  7. package/cjs/component/axis/cartesian/index.js.map +1 -1
  8. package/cjs/component/axis/cartesian/interface/spec.d.ts +4 -1
  9. package/cjs/component/axis/cartesian/interface/spec.js.map +1 -1
  10. package/cjs/component/axis/cartesian/linear-axis.d.ts +3 -2
  11. package/cjs/component/axis/cartesian/linear-axis.js.map +1 -1
  12. package/cjs/component/axis/cartesian/log-axis.d.ts +15 -0
  13. package/cjs/component/axis/cartesian/log-axis.js +23 -0
  14. package/cjs/component/axis/cartesian/log-axis.js.map +1 -0
  15. package/cjs/component/axis/mixin/linear-axis-mixin.d.ts +2 -0
  16. package/cjs/component/axis/mixin/linear-axis-mixin.js +13 -1
  17. package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  18. package/cjs/component/base/util.js +3 -0
  19. package/cjs/component/base/util.js.map +1 -1
  20. package/cjs/component/data-zoom/data-filter-base-component.js +2 -3
  21. package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
  22. package/cjs/component/data-zoom/data-zoom/data-zoom.js +6 -6
  23. package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  24. package/cjs/component/index.d.ts +4 -4
  25. package/cjs/component/index.js +6 -1
  26. package/cjs/component/index.js.map +1 -1
  27. package/cjs/component/interface/type.d.ts +1 -0
  28. package/cjs/component/interface/type.js +12 -12
  29. package/cjs/component/interface/type.js.map +1 -1
  30. package/cjs/component/tooltip/handler/base.d.ts +1 -1
  31. package/cjs/component/tooltip/handler/base.js +1 -1
  32. package/cjs/component/tooltip/handler/base.js.map +1 -1
  33. package/cjs/component/tooltip/handler/canvas/canvas-tooltip-handler.d.ts +1 -0
  34. package/cjs/component/tooltip/handler/canvas/canvas-tooltip-handler.js +11 -4
  35. package/cjs/component/tooltip/handler/canvas/canvas-tooltip-handler.js.map +1 -1
  36. package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.d.ts +1 -0
  37. package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js +3 -0
  38. package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
  39. package/cjs/component/tooltip/interface/event.d.ts +8 -0
  40. package/cjs/component/tooltip/interface/event.js +6 -0
  41. package/cjs/component/tooltip/interface/event.js.map +1 -0
  42. package/cjs/component/tooltip/interface/spec.d.ts +2 -2
  43. package/cjs/component/tooltip/interface/spec.js.map +1 -1
  44. package/cjs/component/tooltip/processor/base.js +6 -2
  45. package/cjs/component/tooltip/processor/base.js.map +1 -1
  46. package/cjs/component/tooltip/processor/dimension-tooltip.js +3 -4
  47. package/cjs/component/tooltip/processor/dimension-tooltip.js.map +1 -1
  48. package/cjs/component/tooltip/processor/mark-tooltip.js +1 -2
  49. package/cjs/component/tooltip/processor/mark-tooltip.js.map +1 -1
  50. package/cjs/component/tooltip/tooltip.d.ts +4 -2
  51. package/cjs/component/tooltip/tooltip.js +21 -9
  52. package/cjs/component/tooltip/tooltip.js.map +1 -1
  53. package/cjs/constant/event.d.ts +3 -1
  54. package/cjs/constant/event.js +2 -1
  55. package/cjs/constant/event.js.map +1 -1
  56. package/cjs/core/index.d.ts +1 -1
  57. package/cjs/core/index.js +1 -1
  58. package/cjs/core/index.js.map +1 -1
  59. package/cjs/data/transforms/sankey.js +10 -2
  60. package/cjs/data/transforms/sankey.js.map +1 -1
  61. package/cjs/event/interface.d.ts +3 -0
  62. package/cjs/event/interface.js.map +1 -1
  63. package/cjs/series/geo/geo.js +2 -1
  64. package/cjs/series/geo/geo.js.map +1 -1
  65. package/cjs/series/map/map.js +2 -2
  66. package/cjs/series/map/map.js.map +1 -1
  67. package/cjs/series/word-cloud/base.d.ts +1 -0
  68. package/cjs/series/word-cloud/base.js +35 -32
  69. package/cjs/series/word-cloud/base.js.map +1 -1
  70. package/cjs/series/word-cloud/word-cloud-3d.js +33 -33
  71. package/cjs/series/word-cloud/word-cloud-3d.js.map +1 -1
  72. package/cjs/theme/buildin-theme/light/component/axis/log-axis.d.ts +2 -0
  73. package/cjs/theme/buildin-theme/light/component/axis/log-axis.js +22 -0
  74. package/cjs/theme/buildin-theme/light/component/axis/log-axis.js.map +1 -0
  75. package/cjs/typings/tooltip/handler.d.ts +1 -0
  76. package/cjs/typings/tooltip/handler.js.map +1 -1
  77. package/cjs/vchart-all.js +1 -1
  78. package/cjs/vchart-all.js.map +1 -1
  79. package/esm/chart/waterfall/waterfall.js +1 -0
  80. package/esm/chart/waterfall/waterfall.js.map +1 -1
  81. package/esm/component/axis/cartesian/index.d.ts +1 -0
  82. package/esm/component/axis/cartesian/index.js +2 -0
  83. package/esm/component/axis/cartesian/index.js.map +1 -1
  84. package/esm/component/axis/cartesian/interface/spec.d.ts +4 -1
  85. package/esm/component/axis/cartesian/interface/spec.js.map +1 -1
  86. package/esm/component/axis/cartesian/linear-axis.d.ts +3 -2
  87. package/esm/component/axis/cartesian/linear-axis.js.map +1 -1
  88. package/esm/component/axis/cartesian/log-axis.d.ts +15 -0
  89. package/esm/component/axis/cartesian/log-axis.js +24 -0
  90. package/esm/component/axis/cartesian/log-axis.js.map +1 -0
  91. package/esm/component/axis/mixin/linear-axis-mixin.d.ts +2 -0
  92. package/esm/component/axis/mixin/linear-axis-mixin.js +8 -1
  93. package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
  94. package/esm/component/base/util.js +3 -0
  95. package/esm/component/base/util.js.map +1 -1
  96. package/esm/component/data-zoom/data-filter-base-component.js +2 -3
  97. package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
  98. package/esm/component/data-zoom/data-zoom/data-zoom.js +6 -6
  99. package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
  100. package/esm/component/index.d.ts +4 -4
  101. package/esm/component/index.js +2 -2
  102. package/esm/component/index.js.map +1 -1
  103. package/esm/component/interface/type.d.ts +1 -0
  104. package/esm/component/interface/type.js +12 -12
  105. package/esm/component/interface/type.js.map +1 -1
  106. package/esm/component/tooltip/handler/base.d.ts +1 -1
  107. package/esm/component/tooltip/handler/base.js +1 -1
  108. package/esm/component/tooltip/handler/base.js.map +1 -1
  109. package/esm/component/tooltip/handler/canvas/canvas-tooltip-handler.d.ts +1 -0
  110. package/esm/component/tooltip/handler/canvas/canvas-tooltip-handler.js +11 -4
  111. package/esm/component/tooltip/handler/canvas/canvas-tooltip-handler.js.map +1 -1
  112. package/esm/component/tooltip/handler/dom/dom-tooltip-handler.d.ts +1 -0
  113. package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js +3 -0
  114. package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
  115. package/esm/component/tooltip/interface/event.d.ts +8 -0
  116. package/esm/component/tooltip/interface/event.js +2 -0
  117. package/esm/component/tooltip/interface/event.js.map +1 -0
  118. package/esm/component/tooltip/interface/spec.d.ts +2 -2
  119. package/esm/component/tooltip/interface/spec.js.map +1 -1
  120. package/esm/component/tooltip/processor/base.js +7 -1
  121. package/esm/component/tooltip/processor/base.js.map +1 -1
  122. package/esm/component/tooltip/processor/dimension-tooltip.js +2 -7
  123. package/esm/component/tooltip/processor/dimension-tooltip.js.map +1 -1
  124. package/esm/component/tooltip/processor/mark-tooltip.js +0 -3
  125. package/esm/component/tooltip/processor/mark-tooltip.js.map +1 -1
  126. package/esm/component/tooltip/tooltip.d.ts +4 -2
  127. package/esm/component/tooltip/tooltip.js +23 -9
  128. package/esm/component/tooltip/tooltip.js.map +1 -1
  129. package/esm/constant/event.d.ts +3 -1
  130. package/esm/constant/event.js +2 -1
  131. package/esm/constant/event.js.map +1 -1
  132. package/esm/core/index.d.ts +1 -1
  133. package/esm/core/index.js +1 -1
  134. package/esm/core/index.js.map +1 -1
  135. package/esm/data/transforms/sankey.js +10 -2
  136. package/esm/data/transforms/sankey.js.map +1 -1
  137. package/esm/event/interface.d.ts +3 -0
  138. package/esm/event/interface.js.map +1 -1
  139. package/esm/series/geo/geo.js +2 -1
  140. package/esm/series/geo/geo.js.map +1 -1
  141. package/esm/series/map/map.js +2 -2
  142. package/esm/series/map/map.js.map +1 -1
  143. package/esm/series/word-cloud/base.d.ts +1 -0
  144. package/esm/series/word-cloud/base.js +35 -32
  145. package/esm/series/word-cloud/base.js.map +1 -1
  146. package/esm/series/word-cloud/word-cloud-3d.js +33 -33
  147. package/esm/series/word-cloud/word-cloud-3d.js.map +1 -1
  148. package/esm/theme/buildin-theme/light/component/axis/log-axis.d.ts +2 -0
  149. package/esm/theme/buildin-theme/light/component/axis/log-axis.js +18 -0
  150. package/esm/theme/buildin-theme/light/component/axis/log-axis.js.map +1 -0
  151. package/esm/typings/tooltip/handler.d.ts +1 -0
  152. package/esm/typings/tooltip/handler.js.map +1 -1
  153. package/esm/vchart-all.js +2 -2
  154. package/esm/vchart-all.js.map +1 -1
  155. package/package.json +1 -1
@@ -11,7 +11,7 @@ class WordCloud3dSeries extends base_1.BaseWordCloudSeries {
11
11
  super(...arguments), this.type = interface_1.SeriesTypeEnum.wordCloud3d;
12
12
  }
13
13
  compile() {
14
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28;
14
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24;
15
15
  super.compile();
16
16
  const wordCloudTransforms = [], valueField = this._valueField, valueScale = new vscale_1.LinearScale, fontWeightRange = this._fontWeightRange, rotateAngles = this._rotateAngles, fontWeightField = this._fontWeightField, fillingRotateAngles = this._wordCloudShapeConfig.fillingRotateAngles;
17
17
  if (valueField) {
@@ -35,12 +35,12 @@ class WordCloud3dSeries extends base_1.BaseWordCloudSeries {
35
35
  as: word_cloud_1.WORD_CLOUD_TEXT,
36
36
  callback: this._spec.word.formatMethod
37
37
  });
38
- const textField = (null === (_c = this._spec.word) || void 0 === _c ? void 0 : _c.formatMethod) ? word_cloud_1.WORD_CLOUD_TEXT : this._nameField, srView = this.getCompiler().getVGrammarView();
38
+ const textField = (null === (_c = this._spec.word) || void 0 === _c ? void 0 : _c.formatMethod) ? word_cloud_1.WORD_CLOUD_TEXT : this._nameField;
39
39
  this._isWordCloudShape ? wordCloudTransforms.push({
40
40
  type: "wordcloudShape",
41
- size: [ srView.width(), srView.height() ],
41
+ size: [ this._region.getLayoutRect().width, this._region.getLayoutRect().height ],
42
42
  shape: this._maskShape,
43
- postProjection: null !== (_q = this._spec.postProjection) && void 0 !== _q ? _q : "StereographicProjection",
43
+ postProjection: null !== (_l = this._spec.postProjection) && void 0 !== _l ? _l : "StereographicProjection",
44
44
  dataIndexKey: constant_1.DEFAULT_DATA_KEY,
45
45
  text: {
46
46
  field: textField
@@ -51,45 +51,45 @@ class WordCloud3dSeries extends base_1.BaseWordCloudSeries {
51
51
  fontSizeRange: this._fontSizeRange,
52
52
  padding: this._fontPadding,
53
53
  rotateList: rotateAngles,
54
- fontFamily: null !== (_r = this._fontFamilyField) && void 0 !== _r ? _r : null === (_t = null === (_s = this._spec.word) || void 0 === _s ? void 0 : _s.style) || void 0 === _t ? void 0 : _t.fontFamily,
54
+ fontFamily: null !== (_m = this._fontFamilyField) && void 0 !== _m ? _m : null === (_p = null === (_o = this._spec.word) || void 0 === _o ? void 0 : _o.style) || void 0 === _p ? void 0 : _p.fontFamily,
55
55
  fontWeight: fontWeightField ? {
56
56
  field: fontWeightField
57
57
  } : valueField ? {
58
58
  field: word_cloud_1.WORD_CLOUD_WEIGHT
59
59
  } : null,
60
- fontStyle: null !== (_u = this._fontStyleField) && void 0 !== _u ? _u : null === (_w = null === (_v = this._spec.word) || void 0 === _v ? void 0 : _v.style) || void 0 === _w ? void 0 : _w.fontStyle,
60
+ fontStyle: null !== (_q = this._fontStyleField) && void 0 !== _q ? _q : null === (_s = null === (_r = this._spec.word) || void 0 === _r ? void 0 : _r.style) || void 0 === _s ? void 0 : _s.fontStyle,
61
61
  depth_3d: this._spec.depth_3d,
62
- fillingFontFamily: null !== (_y = null === (_x = this._wordCloudShapeConfig) || void 0 === _x ? void 0 : _x.fillingFontFamilyField) && void 0 !== _y ? _y : null === (_0 = null === (_z = this._spec.word) || void 0 === _z ? void 0 : _z.style) || void 0 === _0 ? void 0 : _0.fontFamily,
62
+ fillingFontFamily: null !== (_u = null === (_t = this._wordCloudShapeConfig) || void 0 === _t ? void 0 : _t.fillingFontFamilyField) && void 0 !== _u ? _u : null === (_w = null === (_v = this._spec.word) || void 0 === _v ? void 0 : _v.style) || void 0 === _w ? void 0 : _w.fontFamily,
63
63
  fillingPadding: this._fillingFontPadding,
64
- fillingFontStyle: null !== (_2 = null === (_1 = this._wordCloudShapeConfig) || void 0 === _1 ? void 0 : _1.fillingFontStyleField) && void 0 !== _2 ? _2 : null === (_4 = null === (_3 = this._spec.word) || void 0 === _3 ? void 0 : _3.style) || void 0 === _4 ? void 0 : _4.fontStyle,
65
- fillingFontWeight: null !== (_6 = null === (_5 = this._wordCloudShapeConfig) || void 0 === _5 ? void 0 : _5.fillingFontWeightField) && void 0 !== _6 ? _6 : null === (_8 = null === (_7 = this._spec.word) || void 0 === _7 ? void 0 : _7.style) || void 0 === _8 ? void 0 : _8.fontWeight,
64
+ fillingFontStyle: null !== (_y = null === (_x = this._wordCloudShapeConfig) || void 0 === _x ? void 0 : _x.fillingFontStyleField) && void 0 !== _y ? _y : null === (_0 = null === (_z = this._spec.word) || void 0 === _z ? void 0 : _z.style) || void 0 === _0 ? void 0 : _0.fontStyle,
65
+ fillingFontWeight: null !== (_2 = null === (_1 = this._wordCloudShapeConfig) || void 0 === _1 ? void 0 : _1.fillingFontWeightField) && void 0 !== _2 ? _2 : null === (_4 = null === (_3 = this._spec.word) || void 0 === _3 ? void 0 : _3.style) || void 0 === _4 ? void 0 : _4.fontWeight,
66
66
  fillingRotateList: fillingRotateAngles,
67
- fillingTimes: null === (_9 = this._wordCloudShapeConfig) || void 0 === _9 ? void 0 : _9.fillingTimes,
68
- fillingXStep: null === (_10 = this._wordCloudShapeConfig) || void 0 === _10 ? void 0 : _10.fillingXStep,
69
- fillingYStep: null === (_11 = this._wordCloudShapeConfig) || void 0 === _11 ? void 0 : _11.fillingYStep,
70
- fillingXRatioStep: null === (_12 = this._wordCloudShapeConfig) || void 0 === _12 ? void 0 : _12.fillingXRatioStep,
71
- fillingYRatioStep: null === (_13 = this._wordCloudShapeConfig) || void 0 === _13 ? void 0 : _13.fillingYRatioStep,
72
- fillingInitialOpacity: null === (_14 = this._wordCloudShapeConfig) || void 0 === _14 ? void 0 : _14.fillingInitialOpacity,
73
- fillingDeltaOpacity: null === (_15 = this._wordCloudShapeConfig) || void 0 === _15 ? void 0 : _15.fillingDeltaOpacity,
74
- fillingInitialFontSize: null === (_16 = this._wordCloudShapeConfig) || void 0 === _16 ? void 0 : _16.fillingInitialFontSize,
75
- fillingDeltaFontSize: null === (_17 = this._wordCloudShapeConfig) || void 0 === _17 ? void 0 : _17.fillingDeltaFontSize,
76
- ratio: null === (_18 = this._wordCloudShapeConfig) || void 0 === _18 ? void 0 : _18.ratio,
77
- fillingRatio: null === (_19 = this._wordCloudShapeConfig) || void 0 === _19 ? void 0 : _19.fillingRatio,
78
- removeWhiteBorder: null === (_20 = this._wordCloudShapeConfig) || void 0 === _20 ? void 0 : _20.removeWhiteBorder,
79
- textLayoutTimes: null === (_21 = this._wordCloudShapeConfig) || void 0 === _21 ? void 0 : _21.textLayoutTimes,
80
- fontSizeShrinkFactor: null === (_22 = this._wordCloudShapeConfig) || void 0 === _22 ? void 0 : _22.fontSizeShrinkFactor,
81
- stepFactor: null === (_23 = this._wordCloudShapeConfig) || void 0 === _23 ? void 0 : _23.stepFactor,
82
- layoutMode: null === (_24 = this._wordCloudShapeConfig) || void 0 === _24 ? void 0 : _24.layoutMode,
83
- importantWordCount: null === (_25 = this._wordCloudShapeConfig) || void 0 === _25 ? void 0 : _25.importantWordCount,
84
- globalShinkLimit: null === (_26 = this._wordCloudShapeConfig) || void 0 === _26 ? void 0 : _26.globalShinkLimit,
85
- fontSizeEnlargeFactor: null === (_27 = this._wordCloudShapeConfig) || void 0 === _27 ? void 0 : _27.fontSizeEnlargeFactor,
86
- fillingDeltaFontSizeFactor: null === (_28 = this._wordCloudShapeConfig) || void 0 === _28 ? void 0 : _28.fillingDeltaFontSizeFactor
67
+ fillingTimes: null === (_5 = this._wordCloudShapeConfig) || void 0 === _5 ? void 0 : _5.fillingTimes,
68
+ fillingXStep: null === (_6 = this._wordCloudShapeConfig) || void 0 === _6 ? void 0 : _6.fillingXStep,
69
+ fillingYStep: null === (_7 = this._wordCloudShapeConfig) || void 0 === _7 ? void 0 : _7.fillingYStep,
70
+ fillingXRatioStep: null === (_8 = this._wordCloudShapeConfig) || void 0 === _8 ? void 0 : _8.fillingXRatioStep,
71
+ fillingYRatioStep: null === (_9 = this._wordCloudShapeConfig) || void 0 === _9 ? void 0 : _9.fillingYRatioStep,
72
+ fillingInitialOpacity: null === (_10 = this._wordCloudShapeConfig) || void 0 === _10 ? void 0 : _10.fillingInitialOpacity,
73
+ fillingDeltaOpacity: null === (_11 = this._wordCloudShapeConfig) || void 0 === _11 ? void 0 : _11.fillingDeltaOpacity,
74
+ fillingInitialFontSize: null === (_12 = this._wordCloudShapeConfig) || void 0 === _12 ? void 0 : _12.fillingInitialFontSize,
75
+ fillingDeltaFontSize: null === (_13 = this._wordCloudShapeConfig) || void 0 === _13 ? void 0 : _13.fillingDeltaFontSize,
76
+ ratio: null === (_14 = this._wordCloudShapeConfig) || void 0 === _14 ? void 0 : _14.ratio,
77
+ fillingRatio: null === (_15 = this._wordCloudShapeConfig) || void 0 === _15 ? void 0 : _15.fillingRatio,
78
+ removeWhiteBorder: null === (_16 = this._wordCloudShapeConfig) || void 0 === _16 ? void 0 : _16.removeWhiteBorder,
79
+ textLayoutTimes: null === (_17 = this._wordCloudShapeConfig) || void 0 === _17 ? void 0 : _17.textLayoutTimes,
80
+ fontSizeShrinkFactor: null === (_18 = this._wordCloudShapeConfig) || void 0 === _18 ? void 0 : _18.fontSizeShrinkFactor,
81
+ stepFactor: null === (_19 = this._wordCloudShapeConfig) || void 0 === _19 ? void 0 : _19.stepFactor,
82
+ layoutMode: null === (_20 = this._wordCloudShapeConfig) || void 0 === _20 ? void 0 : _20.layoutMode,
83
+ importantWordCount: null === (_21 = this._wordCloudShapeConfig) || void 0 === _21 ? void 0 : _21.importantWordCount,
84
+ globalShinkLimit: null === (_22 = this._wordCloudShapeConfig) || void 0 === _22 ? void 0 : _22.globalShinkLimit,
85
+ fontSizeEnlargeFactor: null === (_23 = this._wordCloudShapeConfig) || void 0 === _23 ? void 0 : _23.fontSizeEnlargeFactor,
86
+ fillingDeltaFontSizeFactor: null === (_24 = this._wordCloudShapeConfig) || void 0 === _24 ? void 0 : _24.fillingDeltaFontSizeFactor
87
87
  }) : (wordCloudTransforms.push({
88
88
  type: "wordcloud",
89
89
  layoutType: this._wordCloudConfig.layoutMode,
90
- size: [ srView.width() - (null === (_d = this._padding) || void 0 === _d ? void 0 : _d.left) || 0 - (null === (_e = this._padding) || void 0 === _e ? void 0 : _e.right) || 0, srView.height() - (null === (_f = this._padding) || void 0 === _f ? void 0 : _f.top) || 0 - (null === (_g = this._padding) || void 0 === _g ? void 0 : _g.bottom) || 0 ],
90
+ size: [ this._region.getLayoutRect().width, this._region.getLayoutRect().height ],
91
91
  shape: this._maskShape,
92
- postProjection: null !== (_h = this._spec.postProjection) && void 0 !== _h ? _h : "StereographicProjection",
92
+ postProjection: null !== (_d = this._spec.postProjection) && void 0 !== _d ? _d : "StereographicProjection",
93
93
  dataIndexKey: constant_1.DEFAULT_DATA_KEY,
94
94
  text: {
95
95
  field: textField
@@ -102,13 +102,13 @@ class WordCloud3dSeries extends base_1.BaseWordCloudSeries {
102
102
  rotate: {
103
103
  field: word_cloud_1.WORD_CLOUD_ANGLE
104
104
  },
105
- fontFamily: null !== (_j = this._fontFamilyField) && void 0 !== _j ? _j : null === (_l = null === (_k = this._spec.word) || void 0 === _k ? void 0 : _k.style) || void 0 === _l ? void 0 : _l.fontFamily,
105
+ fontFamily: null !== (_e = this._fontFamilyField) && void 0 !== _e ? _e : null === (_g = null === (_f = this._spec.word) || void 0 === _f ? void 0 : _f.style) || void 0 === _g ? void 0 : _g.fontFamily,
106
106
  fontWeight: fontWeightField ? {
107
107
  field: fontWeightField
108
108
  } : valueField ? {
109
109
  field: word_cloud_1.WORD_CLOUD_WEIGHT
110
110
  } : null,
111
- fontStyle: null !== (_m = this._fontStyleField) && void 0 !== _m ? _m : null === (_p = null === (_o = this._spec.word) || void 0 === _o ? void 0 : _o.style) || void 0 === _p ? void 0 : _p.fontStyle,
111
+ fontStyle: null !== (_h = this._fontStyleField) && void 0 !== _h ? _h : null === (_k = null === (_j = this._spec.word) || void 0 === _j ? void 0 : _j.style) || void 0 === _k ? void 0 : _k.fontStyle,
112
112
  depth_3d: this._spec.depth_3d,
113
113
  randomVisible: this._random,
114
114
  clip: "clip" === this._wordCloudConfig.drawOutOfBound,
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/series/word-cloud/word-cloud-3d.ts"],"names":[],"mappings":";;;AAAA,6CAAkE;AAGlE,4CAAkE;AAGlE,mDAAgE;AAChE,iDAA6E;AAC7E,6CAA+C;AAC/C,2DAAiD;AACjD,0DAKmC;AAEnC,iCAA6C;AAE7C,MAAa,iBAAkB,SAAQ,0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,CAAC,kBAAkB,CACtC,IAAA,uBAAe,EACb,+BAAsB,CAAC,WAAW,CAAC,GAAG,EAAE;;gBACtC,MAAM,MAAM,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC,eAAe,EAAE,CAAC;gBACpD,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,EAAE,IAAG,MAAA,IAAI,CAAC,QAAQ,0CAAE,IAAI,CAAA,IAAI,CAAC,IAAG,MAAA,IAAI,CAAC,QAAQ,0CAAE,KAAK,CAAA,IAAI,CAAC,CAAC;gBACpF,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,IAAG,MAAA,IAAI,CAAC,QAAQ,0CAAE,GAAG,CAAA,IAAI,CAAC,IAAG,MAAA,IAAI,CAAC,QAAQ,0CAAE,MAAM,CAAA,IAAI,CAAC,CAAC;gBACtF,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;gBACtC,OAAO;oBACL,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAC,IAAI,CAAC,KAAa,CAAC,QAAQ,mCAAI,CAAC,EAAE;oBAC5D,CAAC;iBACF,CAAC;YACJ,CAAC,CAAQ,EACT,IAAA,2BAAmB,EAAC,8BAAkB,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,CAChE,CACF,CAAC;SACH;IACH,CAAC;;AAtPH,8CAuPC;AAtPiB,sBAAI,GAAW,0BAAc,CAAC,WAAW,CAAC","file":"word-cloud-3d.js","sourcesContent":["import { AttributeLevel, DEFAULT_DATA_KEY } from '../../constant';\nimport type { ITextMark } from '../../mark/text';\n// eslint-disable-next-line no-duplicate-imports\nimport { SeriesMarkNameEnum, SeriesTypeEnum } from '../interface';\nimport type { IWordCloud3dSeriesSpec } from './interface';\nimport type { Datum } from '../../typings';\nimport { DEFAULT_MARK_ANIMATION } from '../../animation/config';\nimport { animationConfig, userAnimationConfig } from '../../animation/utils';\nimport { LinearScale } from '@visactor/vscale';\nimport { extent } from '@visactor/vgrammar-util';\nimport {\n WORD_CLOUD_ANGLE,\n WORD_CLOUD_FILLING_ANGLE,\n WORD_CLOUD_TEXT,\n WORD_CLOUD_WEIGHT\n} from '../../constant/word-cloud';\nimport type { ICompilableMark } from '../../compile/mark';\nimport { BaseWordCloudSeries } from './base';\n\nexport class WordCloud3dSeries extends BaseWordCloudSeries<IWordCloud3dSeriesSpec> {\n static readonly type: string = SeriesTypeEnum.wordCloud3d;\n type = SeriesTypeEnum.wordCloud3d;\n\n compile(): void {\n super.compile();\n\n const wordCloudTransforms: any[] = [];\n const valueField = this._valueField;\n const valueScale = new LinearScale();\n const fontWeightRange = this._fontWeightRange;\n const rotateAngles = this._rotateAngles;\n const fontWeightField = this._fontWeightField;\n const fillingRotateAngles = this._wordCloudShapeConfig.fillingRotateAngles;\n\n // fontWeight处理\n if (valueField) {\n const [minValue, maxValue] = extent(this.getViewData()?.latestData.map((datum: any) => datum[valueField]));\n valueScale.domain([minValue, maxValue], true).range(fontWeightRange);\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_WEIGHT,\n callback: (datum: any) => {\n if (minValue === maxValue) {\n return valueScale.scale(maxValue);\n }\n return valueScale.scale(datum[valueField]);\n }\n });\n }\n\n // rotateAngles处理\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_ANGLE,\n callback: () => {\n return rotateAngles[Math.floor(Math.random() * rotateAngles.length)];\n }\n });\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_FILLING_ANGLE,\n callback: () => {\n return fillingRotateAngles[Math.floor(Math.random() * fillingRotateAngles.length)];\n }\n });\n\n // text fromat method 处理\n if (this._spec.word?.formatMethod) {\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_TEXT,\n callback: this._spec.word.formatMethod\n });\n }\n\n const textField = this._spec.word?.formatMethod ? WORD_CLOUD_TEXT : this._nameField;\n\n const srView = this.getCompiler().getVGrammarView();\n // 词云 transform\n if (!this._isWordCloudShape) {\n wordCloudTransforms.push({\n type: 'wordcloud',\n layoutType: this._wordCloudConfig.layoutMode,\n size: [\n srView.width() - this._padding?.left || 0 - this._padding?.right || 0,\n srView.height() - this._padding?.top || 0 - this._padding?.bottom || 0\n ],\n shape: this._maskShape,\n postProjection: this._spec.postProjection ?? 'StereographicProjection',\n dataIndexKey: DEFAULT_DATA_KEY,\n text: { field: textField },\n fontSize: valueField ? { field: valueField } : this._fontSizeRange[0],\n fontSizeRange: this._fontSizeRange,\n padding: this._fontPadding,\n rotate: { field: WORD_CLOUD_ANGLE },\n fontFamily: this._fontFamilyField ?? this._spec.word?.style?.fontFamily,\n fontWeight: fontWeightField ? { field: fontWeightField } : valueField ? { field: WORD_CLOUD_WEIGHT } : null,\n fontStyle: this._fontStyleField ?? this._spec.word?.style?.fontStyle,\n depth_3d: this._spec.depth_3d,\n\n randomVisible: this._random,\n clip: this._wordCloudConfig.drawOutOfBound === 'clip',\n shrink: this._wordCloudConfig.zoomToFit.shrink,\n enlarge: this._wordCloudConfig.zoomToFit.enlarge,\n minFontSize: this._wordCloudConfig.zoomToFit.fontSizeLimitMin,\n progressiveTime: this._wordCloudConfig.progressiveTime,\n progressiveStep: this._wordCloudConfig.progressiveStep\n });\n // 挂到mark的trnsform上,注册的时候决定transform的执行时机\n (this._wordMark as ICompilableMark).getProduct().transform(wordCloudTransforms);\n }\n // 形状词云 transform\n else {\n wordCloudTransforms.push({\n type: 'wordcloudShape',\n size: [srView.width(), srView.height()],\n shape: this._maskShape,\n postProjection: this._spec.postProjection ?? 'StereographicProjection',\n dataIndexKey: DEFAULT_DATA_KEY,\n text: { field: textField },\n fontSize: valueField ? { field: valueField } : this._fontSizeRange[0],\n fontSizeRange: this._fontSizeRange,\n padding: this._fontPadding,\n rotateList: rotateAngles,\n fontFamily: this._fontFamilyField ?? this._spec.word?.style?.fontFamily,\n fontWeight: fontWeightField ? { field: fontWeightField } : valueField ? { field: WORD_CLOUD_WEIGHT } : null,\n fontStyle: this._fontStyleField ?? this._spec.word?.style?.fontStyle,\n depth_3d: this._spec.depth_3d,\n\n fillingFontFamily: this._wordCloudShapeConfig?.fillingFontFamilyField ?? this._spec.word?.style?.fontFamily,\n fillingPadding: this._fillingFontPadding,\n fillingFontStyle: this._wordCloudShapeConfig?.fillingFontStyleField ?? this._spec.word?.style?.fontStyle,\n fillingFontWeight: this._wordCloudShapeConfig?.fillingFontWeightField ?? this._spec.word?.style?.fontWeight, // 填充词fontWeight默认不跟随valueField\n fillingRotateList: fillingRotateAngles,\n\n fillingTimes: this._wordCloudShapeConfig?.fillingTimes,\n fillingXStep: this._wordCloudShapeConfig?.fillingXStep,\n fillingYStep: this._wordCloudShapeConfig?.fillingYStep,\n fillingXRatioStep: this._wordCloudShapeConfig?.fillingXRatioStep,\n fillingYRatioStep: this._wordCloudShapeConfig?.fillingYRatioStep,\n fillingInitialOpacity: this._wordCloudShapeConfig?.fillingInitialOpacity,\n fillingDeltaOpacity: this._wordCloudShapeConfig?.fillingDeltaOpacity,\n fillingInitialFontSize: this._wordCloudShapeConfig?.fillingInitialFontSize,\n fillingDeltaFontSize: this._wordCloudShapeConfig?.fillingDeltaFontSize,\n\n ratio: this._wordCloudShapeConfig?.ratio,\n fillingRatio: this._wordCloudShapeConfig?.fillingRatio,\n removeWhiteBorder: this._wordCloudShapeConfig?.removeWhiteBorder,\n textLayoutTimes: this._wordCloudShapeConfig?.textLayoutTimes,\n fontSizeShrinkFactor: this._wordCloudShapeConfig?.fontSizeShrinkFactor,\n stepFactor: this._wordCloudShapeConfig?.stepFactor,\n layoutMode: this._wordCloudShapeConfig?.layoutMode,\n importantWordCount: this._wordCloudShapeConfig?.importantWordCount,\n globalShinkLimit: this._wordCloudShapeConfig?.globalShinkLimit,\n fontSizeEnlargeFactor: this._wordCloudShapeConfig?.fontSizeEnlargeFactor,\n fillingDeltaFontSizeFactor: this._wordCloudShapeConfig?.fillingDeltaFontSizeFactor\n });\n }\n // 把transform挂载到data的product上\n this._data.getProduct().transform(wordCloudTransforms);\n }\n\n initMark(): void {\n this._wordMark = this._createMark(BaseWordCloudSeries.mark.word, {\n groupKey: this._seriesField,\n support3d: true,\n isSeriesMark: true\n }) as ITextMark;\n if (this._isWordCloudShape) {\n this._fillingWordMark = this._createMark(BaseWordCloudSeries.mark.fillingWord, {\n groupKey: this._seriesField,\n support3d: true,\n isSeriesMark: true\n }) as ITextMark;\n }\n }\n\n initMarkStyle() {\n const wordMark = this._wordMark;\n const fillingWordMark = this._fillingWordMark;\n if (wordMark) {\n this.setMarkStyle(\n wordMark,\n {\n fill: this._colorHexField\n ? (datum: Datum) => datum[this._colorHexField]\n : this.getWordColorAttribute(this._seriesField, false),\n text: (datum: Datum) => datum[this._nameField],\n x: (datum: Datum) => datum.x,\n y: (datum: Datum) => datum.y,\n z: (datum: Datum) => datum.z ?? 0,\n fontFamily: (datum: Datum) => datum.fontFamily,\n fontSize: (datum: Datum) => datum.fontSize,\n fontStyle: (datum: Datum) => datum.fontStyle,\n fontWeight: (datum: Datum) => datum.fontWeight,\n angle: (datum: Datum) => datum.angle,\n visible: (datum: Datum) => !datum.isFillingWord\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n if (fillingWordMark) {\n this.setMarkStyle(\n fillingWordMark,\n {\n fill: this._wordCloudShapeConfig.fillingColorHexField\n ? (datum: Datum) => datum[this._wordCloudShapeConfig.fillingColorHexField]\n : this.getWordColorAttribute(this._wordCloudShapeConfig.fillingSeriesField, true),\n text: (datum: Datum) => datum[this._nameField],\n x: (datum: Datum) => datum.x,\n y: (datum: Datum) => datum.y,\n z: (datum: Datum) => datum.z ?? 0,\n fontFamily: (datum: Datum) => datum.fontFamily,\n fontSize: (datum: Datum) => datum.fontSize,\n fontStyle: (datum: Datum) => datum.fontStyle,\n fontWeight: (datum: Datum) => datum.fontWeight,\n angle: (datum: Datum) => datum.angle,\n visible: (datum: Datum) => datum.isFillingWord\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n this._trigger.registerMark(wordMark);\n this._tooltipHelper?.activeTriggerSet.mark.add(wordMark);\n this._trigger.registerMark(fillingWordMark);\n this._tooltipHelper?.activeTriggerSet.mark.add(fillingWordMark);\n }\n\n initAnimation() {\n if (this._wordMark) {\n this._wordMark.setAnimationConfig(\n animationConfig(\n DEFAULT_MARK_ANIMATION.wordCloud3d(() => {\n const srView = this.getCompiler().getVGrammarView();\n const width = srView.width() - this._padding?.left || 0 - this._padding?.right || 0;\n const height = srView.height() - this._padding?.top || 0 - this._padding?.bottom || 0;\n const r = Math.max(width, height) / 2;\n return {\n center: { x: r, y: r, z: (this._spec as any).depth_3d ?? r },\n r\n };\n }) as any,\n userAnimationConfig(SeriesMarkNameEnum.word, this._spec)\n )\n );\n }\n if (this._fillingWordMark) {\n this._fillingWordMark.setAnimationConfig(\n animationConfig(\n DEFAULT_MARK_ANIMATION.wordCloud3d(() => {\n const srView = this.getCompiler().getVGrammarView();\n const width = srView.width() - this._padding?.left || 0 - this._padding?.right || 0;\n const height = srView.height() - this._padding?.top || 0 - this._padding?.bottom || 0;\n const r = Math.max(width, height) / 2;\n return {\n center: { x: r, y: r, z: (this._spec as any).depth_3d ?? r },\n r\n };\n }) as any,\n userAnimationConfig(SeriesMarkNameEnum.fillingWord, this._spec)\n )\n );\n }\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/series/word-cloud/word-cloud-3d.ts"],"names":[],"mappings":";;;AAAA,6CAAkE;AAGlE,4CAAkE;AAGlE,mDAAgE;AAChE,iDAA6E;AAC7E,6CAA+C;AAC/C,2DAAiD;AACjD,0DAKmC;AAEnC,iCAA6C;AAE7C,MAAa,iBAAkB,SAAQ,0BAA2C;IAAlF;;QAEE,SAAI,GAAG,0BAAc,CAAC,WAAW,CAAC;IAiPpC,CAAC;IA/OC,OAAO;;QACL,KAAK,CAAC,OAAO,EAAE,CAAC;QAEhB,MAAM,mBAAmB,GAAU,EAAE,CAAC;QACtC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IAAI,CAAC,QAAQ,0CAAE,GAAG,CAAA,IAAI,CAAC,IAAG,MAAA,IAAI,CAAC,QAAQ,0CAAE,MAAM,CAAA,IAAI,CAAC,CAAC;gBACtF,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC;gBACtC,OAAO;oBACL,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAC,IAAI,CAAC,KAAa,CAAC,QAAQ,mCAAI,CAAC,EAAE;oBAC5D,CAAC;iBACF,CAAC;YACJ,CAAC,CAAQ,EACT,IAAA,2BAAmB,EAAC,8BAAkB,CAAC,WAAW,EAAE,IAAI,CAAC,KAAK,CAAC,CAChE,CACF,CAAC;SACH;IACH,CAAC;;AAlPH,8CAmPC;AAlPiB,sBAAI,GAAW,0BAAc,CAAC,WAAW,CAAC","file":"word-cloud-3d.js","sourcesContent":["import { AttributeLevel, DEFAULT_DATA_KEY } from '../../constant';\nimport type { ITextMark } from '../../mark/text';\n// eslint-disable-next-line no-duplicate-imports\nimport { SeriesMarkNameEnum, SeriesTypeEnum } from '../interface';\nimport type { IWordCloud3dSeriesSpec } from './interface';\nimport type { Datum } from '../../typings';\nimport { DEFAULT_MARK_ANIMATION } from '../../animation/config';\nimport { animationConfig, userAnimationConfig } from '../../animation/utils';\nimport { LinearScale } from '@visactor/vscale';\nimport { extent } from '@visactor/vgrammar-util';\nimport {\n WORD_CLOUD_ANGLE,\n WORD_CLOUD_FILLING_ANGLE,\n WORD_CLOUD_TEXT,\n WORD_CLOUD_WEIGHT\n} from '../../constant/word-cloud';\nimport type { ICompilableMark } from '../../compile/mark';\nimport { BaseWordCloudSeries } from './base';\n\nexport class WordCloud3dSeries extends BaseWordCloudSeries<IWordCloud3dSeriesSpec> {\n static readonly type: string = SeriesTypeEnum.wordCloud3d;\n type = SeriesTypeEnum.wordCloud3d;\n\n compile(): void {\n super.compile();\n\n const wordCloudTransforms: any[] = [];\n const valueField = this._valueField;\n const valueScale = new LinearScale();\n const fontWeightRange = this._fontWeightRange;\n const rotateAngles = this._rotateAngles;\n const fontWeightField = this._fontWeightField;\n const fillingRotateAngles = this._wordCloudShapeConfig.fillingRotateAngles;\n\n // fontWeight处理\n if (valueField) {\n const [minValue, maxValue] = extent(this.getViewData()?.latestData.map((datum: any) => datum[valueField]));\n valueScale.domain([minValue, maxValue], true).range(fontWeightRange);\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_WEIGHT,\n callback: (datum: any) => {\n if (minValue === maxValue) {\n return valueScale.scale(maxValue);\n }\n return valueScale.scale(datum[valueField]);\n }\n });\n }\n\n // rotateAngles处理\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_ANGLE,\n callback: () => {\n return rotateAngles[Math.floor(Math.random() * rotateAngles.length)];\n }\n });\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_FILLING_ANGLE,\n callback: () => {\n return fillingRotateAngles[Math.floor(Math.random() * fillingRotateAngles.length)];\n }\n });\n\n // text fromat method 处理\n if (this._spec.word?.formatMethod) {\n wordCloudTransforms.push({\n type: 'map',\n as: WORD_CLOUD_TEXT,\n callback: this._spec.word.formatMethod\n });\n }\n\n const textField = this._spec.word?.formatMethod ? WORD_CLOUD_TEXT : this._nameField;\n\n // 词云 transform\n if (!this._isWordCloudShape) {\n wordCloudTransforms.push({\n type: 'wordcloud',\n layoutType: this._wordCloudConfig.layoutMode,\n size: [this._region.getLayoutRect().width, this._region.getLayoutRect().height],\n shape: this._maskShape,\n postProjection: this._spec.postProjection ?? 'StereographicProjection',\n dataIndexKey: DEFAULT_DATA_KEY,\n text: { field: textField },\n fontSize: valueField ? { field: valueField } : this._fontSizeRange[0],\n fontSizeRange: this._fontSizeRange,\n padding: this._fontPadding,\n rotate: { field: WORD_CLOUD_ANGLE },\n fontFamily: this._fontFamilyField ?? this._spec.word?.style?.fontFamily,\n fontWeight: fontWeightField ? { field: fontWeightField } : valueField ? { field: WORD_CLOUD_WEIGHT } : null,\n fontStyle: this._fontStyleField ?? this._spec.word?.style?.fontStyle,\n depth_3d: this._spec.depth_3d,\n\n randomVisible: this._random,\n clip: this._wordCloudConfig.drawOutOfBound === 'clip',\n shrink: this._wordCloudConfig.zoomToFit.shrink,\n enlarge: this._wordCloudConfig.zoomToFit.enlarge,\n minFontSize: this._wordCloudConfig.zoomToFit.fontSizeLimitMin,\n progressiveTime: this._wordCloudConfig.progressiveTime,\n progressiveStep: this._wordCloudConfig.progressiveStep\n });\n // 挂到mark的trnsform上,注册的时候决定transform的执行时机\n (this._wordMark as ICompilableMark).getProduct().transform(wordCloudTransforms);\n }\n // 形状词云 transform\n else {\n wordCloudTransforms.push({\n type: 'wordcloudShape',\n size: [this._region.getLayoutRect().width, this._region.getLayoutRect().height],\n shape: this._maskShape,\n postProjection: this._spec.postProjection ?? 'StereographicProjection',\n dataIndexKey: DEFAULT_DATA_KEY,\n text: { field: textField },\n fontSize: valueField ? { field: valueField } : this._fontSizeRange[0],\n fontSizeRange: this._fontSizeRange,\n padding: this._fontPadding,\n rotateList: rotateAngles,\n fontFamily: this._fontFamilyField ?? this._spec.word?.style?.fontFamily,\n fontWeight: fontWeightField ? { field: fontWeightField } : valueField ? { field: WORD_CLOUD_WEIGHT } : null,\n fontStyle: this._fontStyleField ?? this._spec.word?.style?.fontStyle,\n depth_3d: this._spec.depth_3d,\n\n fillingFontFamily: this._wordCloudShapeConfig?.fillingFontFamilyField ?? this._spec.word?.style?.fontFamily,\n fillingPadding: this._fillingFontPadding,\n fillingFontStyle: this._wordCloudShapeConfig?.fillingFontStyleField ?? this._spec.word?.style?.fontStyle,\n fillingFontWeight: this._wordCloudShapeConfig?.fillingFontWeightField ?? this._spec.word?.style?.fontWeight, // 填充词fontWeight默认不跟随valueField\n fillingRotateList: fillingRotateAngles,\n\n fillingTimes: this._wordCloudShapeConfig?.fillingTimes,\n fillingXStep: this._wordCloudShapeConfig?.fillingXStep,\n fillingYStep: this._wordCloudShapeConfig?.fillingYStep,\n fillingXRatioStep: this._wordCloudShapeConfig?.fillingXRatioStep,\n fillingYRatioStep: this._wordCloudShapeConfig?.fillingYRatioStep,\n fillingInitialOpacity: this._wordCloudShapeConfig?.fillingInitialOpacity,\n fillingDeltaOpacity: this._wordCloudShapeConfig?.fillingDeltaOpacity,\n fillingInitialFontSize: this._wordCloudShapeConfig?.fillingInitialFontSize,\n fillingDeltaFontSize: this._wordCloudShapeConfig?.fillingDeltaFontSize,\n\n ratio: this._wordCloudShapeConfig?.ratio,\n fillingRatio: this._wordCloudShapeConfig?.fillingRatio,\n removeWhiteBorder: this._wordCloudShapeConfig?.removeWhiteBorder,\n textLayoutTimes: this._wordCloudShapeConfig?.textLayoutTimes,\n fontSizeShrinkFactor: this._wordCloudShapeConfig?.fontSizeShrinkFactor,\n stepFactor: this._wordCloudShapeConfig?.stepFactor,\n layoutMode: this._wordCloudShapeConfig?.layoutMode,\n importantWordCount: this._wordCloudShapeConfig?.importantWordCount,\n globalShinkLimit: this._wordCloudShapeConfig?.globalShinkLimit,\n fontSizeEnlargeFactor: this._wordCloudShapeConfig?.fontSizeEnlargeFactor,\n fillingDeltaFontSizeFactor: this._wordCloudShapeConfig?.fillingDeltaFontSizeFactor\n });\n }\n // 把transform挂载到data的product上\n this._data.getProduct().transform(wordCloudTransforms);\n }\n\n initMark(): void {\n this._wordMark = this._createMark(BaseWordCloudSeries.mark.word, {\n groupKey: this._seriesField,\n support3d: true,\n isSeriesMark: true\n }) as ITextMark;\n if (this._isWordCloudShape) {\n this._fillingWordMark = this._createMark(BaseWordCloudSeries.mark.fillingWord, {\n groupKey: this._seriesField,\n support3d: true,\n isSeriesMark: true\n }) as ITextMark;\n }\n }\n\n initMarkStyle() {\n const wordMark = this._wordMark;\n const fillingWordMark = this._fillingWordMark;\n if (wordMark) {\n this.setMarkStyle(\n wordMark,\n {\n fill: this._colorHexField\n ? (datum: Datum) => datum[this._colorHexField]\n : this.getWordColorAttribute(this._seriesField, false),\n text: (datum: Datum) => datum[this._nameField],\n x: (datum: Datum) => datum.x,\n y: (datum: Datum) => datum.y,\n z: (datum: Datum) => datum.z ?? 0,\n fontFamily: (datum: Datum) => datum.fontFamily,\n fontSize: (datum: Datum) => datum.fontSize,\n fontStyle: (datum: Datum) => datum.fontStyle,\n fontWeight: (datum: Datum) => datum.fontWeight,\n angle: (datum: Datum) => datum.angle,\n visible: (datum: Datum) => !datum.isFillingWord\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n if (fillingWordMark) {\n this.setMarkStyle(\n fillingWordMark,\n {\n fill: this._wordCloudShapeConfig.fillingColorHexField\n ? (datum: Datum) => datum[this._wordCloudShapeConfig.fillingColorHexField]\n : this.getWordColorAttribute(this._wordCloudShapeConfig.fillingSeriesField, true),\n text: (datum: Datum) => datum[this._nameField],\n x: (datum: Datum) => datum.x,\n y: (datum: Datum) => datum.y,\n z: (datum: Datum) => datum.z ?? 0,\n fontFamily: (datum: Datum) => datum.fontFamily,\n fontSize: (datum: Datum) => datum.fontSize,\n fontStyle: (datum: Datum) => datum.fontStyle,\n fontWeight: (datum: Datum) => datum.fontWeight,\n angle: (datum: Datum) => datum.angle,\n visible: (datum: Datum) => datum.isFillingWord\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n this._trigger.registerMark(wordMark);\n this._tooltipHelper?.activeTriggerSet.mark.add(wordMark);\n this._trigger.registerMark(fillingWordMark);\n this._tooltipHelper?.activeTriggerSet.mark.add(fillingWordMark);\n }\n\n initAnimation() {\n if (this._wordMark) {\n this._wordMark.setAnimationConfig(\n animationConfig(\n DEFAULT_MARK_ANIMATION.wordCloud3d(() => {\n const srView = this.getCompiler().getVGrammarView();\n const width = srView.width() - this._padding?.left || 0 - this._padding?.right || 0;\n const height = srView.height() - this._padding?.top || 0 - this._padding?.bottom || 0;\n const r = Math.max(width, height) / 2;\n return {\n center: { x: r, y: r, z: (this._spec as any).depth_3d ?? r },\n r\n };\n }) as any,\n userAnimationConfig(SeriesMarkNameEnum.word, this._spec)\n )\n );\n }\n if (this._fillingWordMark) {\n this._fillingWordMark.setAnimationConfig(\n animationConfig(\n DEFAULT_MARK_ANIMATION.wordCloud3d(() => {\n const srView = this.getCompiler().getVGrammarView();\n const width = srView.width() - this._padding?.left || 0 - this._padding?.right || 0;\n const height = srView.height() - this._padding?.top || 0 - this._padding?.bottom || 0;\n const r = Math.max(width, height) / 2;\n return {\n center: { x: r, y: r, z: (this._spec as any).depth_3d ?? r },\n r\n };\n }) as any,\n userAnimationConfig(SeriesMarkNameEnum.fillingWord, this._spec)\n )\n );\n }\n }\n}\n"]}
@@ -0,0 +1,2 @@
1
+ import type { IAxisCommonTheme } from '../../../../../component/axis';
2
+ export declare const axisLog: IAxisCommonTheme;
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.axisLog = void 0, exports.axisLog = {
6
+ domainLine: {
7
+ visible: !1
8
+ },
9
+ grid: {
10
+ visible: !0
11
+ },
12
+ subGrid: {
13
+ visible: !1
14
+ },
15
+ tick: {
16
+ visible: !1
17
+ },
18
+ subTick: {
19
+ visible: !1
20
+ }
21
+ };
22
+ //# sourceMappingURL=log-axis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/theme/buildin-theme/light/component/axis/log-axis.ts"],"names":[],"mappings":";;;AAEa,QAAA,OAAO,GAAqB;IACvC,UAAU,EAAE;QACV,OAAO,EAAE,KAAK;KACf;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,IAAI;KACd;IACD,OAAO,EAAE;QACP,OAAO,EAAE,KAAK;KACf;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,KAAK;KACf;IACD,OAAO,EAAE;QACP,OAAO,EAAE,KAAK;KACf;CACF,CAAC","file":"log-axis.js","sourcesContent":["import type { IAxisCommonTheme } from '../../../../../component/axis';\n\nexport const axisLog: IAxisCommonTheme = {\n domainLine: {\n visible: false\n },\n grid: {\n visible: true\n },\n subGrid: {\n visible: false\n },\n tick: {\n visible: false\n },\n subTick: {\n visible: false\n }\n};\n"]}
@@ -3,6 +3,7 @@ import type { IDimensionData, IDimensionInfo } from '../../event/events/dimensio
3
3
  export interface ITooltipHandler extends ITooltipHandlerSpec {
4
4
  getTooltipContainer?: () => any;
5
5
  reInit?: () => any;
6
+ isTooltipShown?: () => boolean;
6
7
  }
7
8
  export type TooltipData = IDimensionInfo[] | IDimensionData[];
8
9
  export type TooltipActiveType = 'mark' | 'dimension';
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/typings/tooltip/handler.ts"],"names":[],"mappings":"","file":"handler.js","sourcesContent":["import type { ITooltipHandlerSpec } from '../../component/tooltip/interface';\nimport type { IDimensionData, IDimensionInfo } from '../../event/events/dimension/interface';\n\nexport interface ITooltipHandler extends ITooltipHandlerSpec {\n /** 可选,获取 tooltip 所在容器 */\n getTooltipContainer?: () => any;\n /** 可选,更新 tooltip spec 或主题后执行的回调 */\n reInit?: () => any;\n}\n\nexport type TooltipData = IDimensionInfo[] | IDimensionData[];\n\nexport type TooltipActiveType = 'mark' | 'dimension';\n"]}
1
+ {"version":3,"sources":["../src/typings/tooltip/handler.ts"],"names":[],"mappings":"","file":"handler.js","sourcesContent":["import type { ITooltipHandlerSpec } from '../../component/tooltip/interface';\nimport type { IDimensionData, IDimensionInfo } from '../../event/events/dimension/interface';\n\nexport interface ITooltipHandler extends ITooltipHandlerSpec {\n /** 可选,获取 tooltip 所在容器 */\n getTooltipContainer?: () => any;\n /** 可选,更新 tooltip spec 或主题后执行的回调 */\n reInit?: () => any;\n /** 可选,判断 tooltip 是否正在显示 */\n isTooltipShown?: () => boolean;\n}\n\nexport type TooltipData = IDimensionInfo[] | IDimensionData[];\n\nexport type TooltipActiveType = 'mark' | 'dimension';\n"]}
package/cjs/vchart-all.js CHANGED
@@ -16,6 +16,6 @@ Object.defineProperty(exports, "VChart", {
16
16
  const chart_1 = require("./chart"), component_1 = require("./component"), layout_1 = require("./layout"), vrender_components_1 = require("@visactor/vrender-components");
17
17
 
18
18
  (0, vrender_components_1.loadPoptip)({}), core_1.VChart.useChart([ chart_1.AreaChart, chart_1.LineChart, chart_1.BarChart, chart_1.Bar3dChart, chart_1.ScatterChart, chart_1.MapChart, chart_1.PieChart, chart_1.Pie3dChart, chart_1.RoseChart, chart_1.RadarChart, chart_1.CommonChart, chart_1.SequenceChart, chart_1.HistogramChart, chart_1.Histogram3dChart, chart_1.CircularProgressChart, chart_1.WordCloudChart, chart_1.WordCloud3dChart, chart_1.FunnelChart, chart_1.Funnel3dChart, chart_1.LinearProgressChart, chart_1.RangeColumnChart, chart_1.RangeColumn3dChart, chart_1.SunburstChart, chart_1.CirclePackingChart, chart_1.TreeMapChart, chart_1.WaterfallChart, chart_1.BoxPlotChart, chart_1.SankeyChart, chart_1.GaugeChart, chart_1.RangeAreaChart, chart_1.HeatmapChart ]),
19
- core_1.VChart.useComponent([ component_1.CartesianLinearAxis, component_1.CartesianBandAxis, component_1.CartesianTimeAxis, component_1.PolarBandAxis, component_1.PolarLinearAxis, component_1.DiscreteLegend, component_1.ContinuousLegend, component_1.Tooltip, component_1.CartesianCrossHair, component_1.PolarCrossHair, component_1.DataZoom, component_1.ScrollBar, component_1.Indicator, component_1.GeoCoordinate, component_1.MarkLine, component_1.Title, component_1.MarkArea, component_1.Player, component_1.Label, component_1.MarkPoint, component_1.Brush, component_1.CustomMark, component_1.MapLabelComponent ]),
19
+ core_1.VChart.useComponent([ component_1.CartesianLinearAxis, component_1.CartesianBandAxis, component_1.CartesianTimeAxis, component_1.CartesianLogAxis, component_1.PolarBandAxis, component_1.PolarLinearAxis, component_1.DiscreteLegend, component_1.ContinuousLegend, component_1.Tooltip, component_1.CartesianCrossHair, component_1.PolarCrossHair, component_1.DataZoom, component_1.ScrollBar, component_1.Indicator, component_1.GeoCoordinate, component_1.MarkLine, component_1.Title, component_1.MarkArea, component_1.Player, component_1.Label, component_1.MarkPoint, component_1.Brush, component_1.CustomMark, component_1.MapLabelComponent ]),
20
20
  core_1.Factory.registerLayout("grid", layout_1.GridLayout), core_1.Factory.registerLayout("layout3d", layout_1.Layout3d);
21
21
  //# sourceMappingURL=vchart-all.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/vchart-all.ts"],"names":[],"mappings":";;;AAAA,iCAAyC;AAoIhC,uFApIA,aAAM,OAoIA;AAnIf,mCAgCiB;AAEjB,2CAwBqB;AACrB,qCAAgD;AAChD,qEAA0D;AAG1D,IAAA,+BAAU,EAAC,EAAE,CAAC,CAAC;AAGf,aAAM,CAAC,QAAQ,CAAC;IACd,iBAAS;IACT,iBAAS;IACT,gBAAQ;IACR,kBAAU;IACV,oBAAY;IACZ,gBAAQ;IACR,gBAAQ;IACR,kBAAU;IACV,iBAAS;IACT,kBAAU;IACV,mBAAW;IACX,qBAAa;IACb,sBAAc;IACd,wBAAgB;IAChB,6BAAqB;IACrB,sBAAc;IACd,wBAAgB;IAChB,mBAAW;IACX,qBAAa;IACb,2BAAmB;IACnB,wBAAgB;IAChB,0BAAkB;IAClB,qBAAa;IACb,0BAAkB;IAClB,oBAAY;IACZ,sBAAc;IACd,oBAAY;IACZ,mBAAW;IACX,kBAAU;IACV,sBAAc;IACd,oBAAY;CACb,CAAC,CAAC;AAGH,aAAM,CAAC,YAAY,CAAC;IAClB,+BAAmB;IACnB,6BAAiB;IACjB,6BAAiB;IACjB,yBAAa;IACb,2BAAe;IACf,0BAAc;IACd,4BAAgB;IAChB,mBAAO;IACP,8BAAkB;IAClB,0BAAc;IACd,oBAAQ;IACR,qBAAS;IACT,qBAAS;IACT,yBAAa;IACb,oBAAQ;IACR,iBAAK;IACL,oBAAQ;IACR,kBAAM;IACN,iBAAK;IACL,qBAAS;IACT,iBAAK;IACL,sBAAU;IACV,6BAAiB;CAClB,CAAC,CAAC;AAGH,cAAO,CAAC,cAAc,CAAC,MAAM,EAAE,mBAAiB,CAAC,CAAC;AAClD,cAAO,CAAC,cAAc,CAAC,UAAU,EAAE,iBAAe,CAAC,CAAC","file":"vchart-all.js","sourcesContent":["import { VChart, Factory } from './core';\nimport {\n AreaChart,\n LineChart,\n BarChart,\n Bar3dChart,\n ScatterChart,\n MapChart,\n PieChart,\n Pie3dChart,\n RoseChart,\n RadarChart,\n CommonChart,\n SequenceChart,\n HistogramChart,\n Histogram3dChart,\n CircularProgressChart,\n WordCloudChart,\n WordCloud3dChart,\n FunnelChart,\n Funnel3dChart,\n LinearProgressChart,\n RangeColumnChart,\n RangeColumn3dChart,\n SunburstChart,\n CirclePackingChart,\n TreeMapChart,\n WaterfallChart,\n BoxPlotChart,\n SankeyChart,\n GaugeChart,\n RangeAreaChart,\n HeatmapChart\n} from './chart';\n\nimport {\n CartesianLinearAxis,\n CartesianBandAxis,\n CartesianTimeAxis,\n PolarBandAxis,\n PolarLinearAxis,\n DiscreteLegend,\n ContinuousLegend,\n Tooltip,\n CartesianCrossHair,\n PolarCrossHair,\n DataZoom,\n ScrollBar,\n Indicator,\n GeoCoordinate,\n MarkLine,\n Title,\n MarkArea,\n Player,\n Label,\n MarkPoint,\n Brush,\n CustomMark,\n MapLabelComponent\n} from './component';\nimport { GridLayout, Layout3d } from './layout';\nimport { loadPoptip } from '@visactor/vrender-components';\n\n// 装载 poptip\nloadPoptip({});\n\n// charts\nVChart.useChart([\n AreaChart,\n LineChart,\n BarChart,\n Bar3dChart,\n ScatterChart,\n MapChart,\n PieChart,\n Pie3dChart,\n RoseChart,\n RadarChart,\n CommonChart,\n SequenceChart,\n HistogramChart,\n Histogram3dChart,\n CircularProgressChart,\n WordCloudChart,\n WordCloud3dChart,\n FunnelChart,\n Funnel3dChart,\n LinearProgressChart,\n RangeColumnChart,\n RangeColumn3dChart,\n SunburstChart,\n CirclePackingChart,\n TreeMapChart,\n WaterfallChart,\n BoxPlotChart,\n SankeyChart,\n GaugeChart,\n RangeAreaChart,\n HeatmapChart\n]);\n\n// components\nVChart.useComponent([\n CartesianLinearAxis,\n CartesianBandAxis,\n CartesianTimeAxis,\n PolarBandAxis,\n PolarLinearAxis,\n DiscreteLegend,\n ContinuousLegend,\n Tooltip,\n CartesianCrossHair,\n PolarCrossHair,\n DataZoom,\n ScrollBar,\n Indicator,\n GeoCoordinate,\n MarkLine,\n Title,\n MarkArea,\n Player,\n Label,\n MarkPoint,\n Brush,\n CustomMark,\n MapLabelComponent\n]);\n\n// layout\nFactory.registerLayout('grid', GridLayout as any);\nFactory.registerLayout('layout3d', Layout3d as any);\n\nexport { VChart };\n"]}
1
+ {"version":3,"sources":["../src/vchart-all.ts"],"names":[],"mappings":";;;AAAA,iCAAyC;AAsIhC,uFAtIA,aAAM,OAsIA;AArIf,mCAgCiB;AAEjB,2CAyBqB;AACrB,qCAAgD;AAChD,qEAA0D;AAG1D,IAAA,+BAAU,EAAC,EAAE,CAAC,CAAC;AAGf,aAAM,CAAC,QAAQ,CAAC;IACd,iBAAS;IACT,iBAAS;IACT,gBAAQ;IACR,kBAAU;IACV,oBAAY;IACZ,gBAAQ;IACR,gBAAQ;IACR,kBAAU;IACV,iBAAS;IACT,kBAAU;IACV,mBAAW;IACX,qBAAa;IACb,sBAAc;IACd,wBAAgB;IAChB,6BAAqB;IACrB,sBAAc;IACd,wBAAgB;IAChB,mBAAW;IACX,qBAAa;IACb,2BAAmB;IACnB,wBAAgB;IAChB,0BAAkB;IAClB,qBAAa;IACb,0BAAkB;IAClB,oBAAY;IACZ,sBAAc;IACd,oBAAY;IACZ,mBAAW;IACX,kBAAU;IACV,sBAAc;IACd,oBAAY;CACb,CAAC,CAAC;AAGH,aAAM,CAAC,YAAY,CAAC;IAClB,+BAAmB;IACnB,6BAAiB;IACjB,6BAAiB;IACjB,4BAAgB;IAChB,yBAAa;IACb,2BAAe;IACf,0BAAc;IACd,4BAAgB;IAChB,mBAAO;IACP,8BAAkB;IAClB,0BAAc;IACd,oBAAQ;IACR,qBAAS;IACT,qBAAS;IACT,yBAAa;IACb,oBAAQ;IACR,iBAAK;IACL,oBAAQ;IACR,kBAAM;IACN,iBAAK;IACL,qBAAS;IACT,iBAAK;IACL,sBAAU;IACV,6BAAiB;CAClB,CAAC,CAAC;AAGH,cAAO,CAAC,cAAc,CAAC,MAAM,EAAE,mBAAiB,CAAC,CAAC;AAClD,cAAO,CAAC,cAAc,CAAC,UAAU,EAAE,iBAAe,CAAC,CAAC","file":"vchart-all.js","sourcesContent":["import { VChart, Factory } from './core';\nimport {\n AreaChart,\n LineChart,\n BarChart,\n Bar3dChart,\n ScatterChart,\n MapChart,\n PieChart,\n Pie3dChart,\n RoseChart,\n RadarChart,\n CommonChart,\n SequenceChart,\n HistogramChart,\n Histogram3dChart,\n CircularProgressChart,\n WordCloudChart,\n WordCloud3dChart,\n FunnelChart,\n Funnel3dChart,\n LinearProgressChart,\n RangeColumnChart,\n RangeColumn3dChart,\n SunburstChart,\n CirclePackingChart,\n TreeMapChart,\n WaterfallChart,\n BoxPlotChart,\n SankeyChart,\n GaugeChart,\n RangeAreaChart,\n HeatmapChart\n} from './chart';\n\nimport {\n CartesianLinearAxis,\n CartesianBandAxis,\n CartesianTimeAxis,\n PolarBandAxis,\n CartesianLogAxis,\n PolarLinearAxis,\n DiscreteLegend,\n ContinuousLegend,\n Tooltip,\n CartesianCrossHair,\n PolarCrossHair,\n DataZoom,\n ScrollBar,\n Indicator,\n GeoCoordinate,\n MarkLine,\n Title,\n MarkArea,\n Player,\n Label,\n MarkPoint,\n Brush,\n CustomMark,\n MapLabelComponent\n} from './component';\nimport { GridLayout, Layout3d } from './layout';\nimport { loadPoptip } from '@visactor/vrender-components';\n\n// 装载 poptip\nloadPoptip({});\n\n// charts\nVChart.useChart([\n AreaChart,\n LineChart,\n BarChart,\n Bar3dChart,\n ScatterChart,\n MapChart,\n PieChart,\n Pie3dChart,\n RoseChart,\n RadarChart,\n CommonChart,\n SequenceChart,\n HistogramChart,\n Histogram3dChart,\n CircularProgressChart,\n WordCloudChart,\n WordCloud3dChart,\n FunnelChart,\n Funnel3dChart,\n LinearProgressChart,\n RangeColumnChart,\n RangeColumn3dChart,\n SunburstChart,\n CirclePackingChart,\n TreeMapChart,\n WaterfallChart,\n BoxPlotChart,\n SankeyChart,\n GaugeChart,\n RangeAreaChart,\n HeatmapChart\n]);\n\n// components\nVChart.useComponent([\n CartesianLinearAxis,\n CartesianBandAxis,\n CartesianTimeAxis,\n CartesianLogAxis,\n PolarBandAxis,\n PolarLinearAxis,\n DiscreteLegend,\n ContinuousLegend,\n Tooltip,\n CartesianCrossHair,\n PolarCrossHair,\n DataZoom,\n ScrollBar,\n Indicator,\n GeoCoordinate,\n MarkLine,\n Title,\n MarkArea,\n Player,\n Label,\n MarkPoint,\n Brush,\n CustomMark,\n MapLabelComponent\n]);\n\n// layout\nFactory.registerLayout('grid', GridLayout as any);\nFactory.registerLayout('layout3d', Layout3d as any);\n\nexport { VChart };\n"]}
@@ -25,6 +25,7 @@ export class WaterfallChart extends BarChart {
25
25
  }
26
26
  _getDefaultSeriesSpec(spec) {
27
27
  return Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), {
28
+ bar: spec.bar,
28
29
  stackLabel: spec.stackLabel,
29
30
  leaderLine: spec.leaderLine,
30
31
  total: spec.total
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/chart/waterfall/waterfall.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,oCAAoC,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,MAAM,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;AAEpC,MAAM,OAAO,cAAe,SAAQ,QAAQ;IAA5C;;QAGW,SAAI,GAAW,aAAa,CAAC,SAAS,CAAC;QACvC,eAAU,GAAW,cAAc,CAAC,SAAS,CAAC;IAuBzD,CAAC;IArBC,aAAa,CAAC,IAAyB;QACrC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC1B,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;gBAC9B,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC;gBACjB,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC;gBAChB,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC;YACnB,CAAC,CAAC,CAAC;SACJ;QAED,oCAAoC,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAES,qBAAqB,CAAC,IAAyB;QACvD,uCACK,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,KACpC,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,KAAK,EAAE,IAAI,CAAC,KAAK,IACjB;IACJ,CAAC;;AAzBe,mBAAI,GAAW,aAAa,CAAC,SAAS,CAAC;AACvC,mBAAI,GAAW,eAAe,CAAC","file":"waterfall.js","sourcesContent":["import { array } from '@visactor/vutils';\nimport { SeriesTypeEnum } from '../../series/interface';\nimport { BarChart } from '../bar';\nimport { ChartTypeEnum } from '../interface';\nimport type { IWaterfallChartSpec } from './interface';\nimport { setDefaultCrosshairForCartesianChart } from '../util';\nimport { VChart } from '../../core/vchart';\nimport { WaterfallSeries } from '../../series';\nVChart.useSeries([WaterfallSeries]);\n\nexport class WaterfallChart extends BarChart {\n static readonly type: string = ChartTypeEnum.waterfall;\n static readonly view: string = 'singleDefault';\n readonly type: string = ChartTypeEnum.waterfall;\n readonly seriesType: string = SeriesTypeEnum.waterfall;\n\n transformSpec(spec: IWaterfallChartSpec): void {\n super.transformSpec(spec);\n if (spec.legends) {\n array(spec.legends).forEach(l => {\n l.select = false;\n l.hover = false;\n l.filter = false;\n });\n }\n\n setDefaultCrosshairForCartesianChart(spec);\n }\n\n protected _getDefaultSeriesSpec(spec: IWaterfallChartSpec): any {\n return {\n ...super._getDefaultSeriesSpec(spec),\n stackLabel: spec.stackLabel,\n leaderLine: spec.leaderLine,\n total: spec.total\n };\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/chart/waterfall/waterfall.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACzC,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAClC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,oCAAoC,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC/C,MAAM,CAAC,SAAS,CAAC,CAAC,eAAe,CAAC,CAAC,CAAC;AAEpC,MAAM,OAAO,cAAe,SAAQ,QAAQ;IAA5C;;QAGW,SAAI,GAAW,aAAa,CAAC,SAAS,CAAC;QACvC,eAAU,GAAW,cAAc,CAAC,SAAS,CAAC;IAwBzD,CAAC;IAtBC,aAAa,CAAC,IAAyB;QACrC,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC1B,IAAI,IAAI,CAAC,OAAO,EAAE;YAChB,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;gBAC9B,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC;gBACjB,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC;gBAChB,CAAC,CAAC,MAAM,GAAG,KAAK,CAAC;YACnB,CAAC,CAAC,CAAC;SACJ;QAED,oCAAoC,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;IAES,qBAAqB,CAAC,IAAyB;QACvD,uCACK,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,KACpC,GAAG,EAAE,IAAI,CAAC,GAAG,EACb,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,UAAU,EAAE,IAAI,CAAC,UAAU,EAC3B,KAAK,EAAE,IAAI,CAAC,KAAK,IACjB;IACJ,CAAC;;AA1Be,mBAAI,GAAW,aAAa,CAAC,SAAS,CAAC;AACvC,mBAAI,GAAW,eAAe,CAAC","file":"waterfall.js","sourcesContent":["import { array } from '@visactor/vutils';\nimport { SeriesTypeEnum } from '../../series/interface';\nimport { BarChart } from '../bar';\nimport { ChartTypeEnum } from '../interface';\nimport type { IWaterfallChartSpec } from './interface';\nimport { setDefaultCrosshairForCartesianChart } from '../util';\nimport { VChart } from '../../core/vchart';\nimport { WaterfallSeries } from '../../series';\nVChart.useSeries([WaterfallSeries]);\n\nexport class WaterfallChart extends BarChart {\n static readonly type: string = ChartTypeEnum.waterfall;\n static readonly view: string = 'singleDefault';\n readonly type: string = ChartTypeEnum.waterfall;\n readonly seriesType: string = SeriesTypeEnum.waterfall;\n\n transformSpec(spec: IWaterfallChartSpec): void {\n super.transformSpec(spec);\n if (spec.legends) {\n array(spec.legends).forEach(l => {\n l.select = false;\n l.hover = false;\n l.filter = false;\n });\n }\n\n setDefaultCrosshairForCartesianChart(spec);\n }\n\n protected _getDefaultSeriesSpec(spec: IWaterfallChartSpec): any {\n return {\n ...super._getDefaultSeriesSpec(spec),\n bar: spec.bar,\n stackLabel: spec.stackLabel,\n leaderLine: spec.leaderLine,\n total: spec.total\n };\n }\n}\n"]}
@@ -2,4 +2,5 @@ export * from './axis';
2
2
  export * from './linear-axis';
3
3
  export * from './band-axis';
4
4
  export * from './time-axis';
5
+ export * from './log-axis';
5
6
  export * from './interface';
@@ -6,5 +6,7 @@ export * from "./band-axis";
6
6
 
7
7
  export * from "./time-axis";
8
8
 
9
+ export * from "./log-axis";
10
+
9
11
  export * from "./interface";
10
12
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/axis/cartesian/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC","file":"index.js","sourcesContent":["export * from './axis';\nexport * from './linear-axis';\nexport * from './band-axis';\nexport * from './time-axis';\nexport * from './interface';\n"]}
1
+ {"version":3,"sources":["../src/component/axis/cartesian/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC","file":"index.js","sourcesContent":["export * from './axis';\nexport * from './linear-axis';\nexport * from './band-axis';\nexport * from './time-axis';\nexport * from './log-axis';\nexport * from './interface';\n"]}
@@ -2,7 +2,7 @@ import type { IOrientType, IRectMarkSpec, StringOrNumber } from '../../../../typ
2
2
  import type { IBandAxisSpec, ILinearAxisSpec, IGrid, ICommonAxisSpec } from '../../interface';
3
3
  import type { ICartesianDomainLine, ICartesianLabel, ITimeLayerType, ICartesianTitle } from './common';
4
4
  import type { AxisItemStateStyle } from '@visactor/vrender-components';
5
- export type ICartesianAxisSpec = ICartesianLinearAxisSpec | ICartesianBandAxisSpec | ICartesianTimeAxisSpec;
5
+ export type ICartesianAxisSpec = ICartesianLinearAxisSpec | ICartesianBandAxisSpec | ICartesianTimeAxisSpec | ICartesianLogAxisSpec;
6
6
  export type ICartesianAxisCommonSpec = ICommonAxisSpec & {
7
7
  orient: IOrientType;
8
8
  grid?: IGrid;
@@ -31,3 +31,6 @@ export type ICartesianBandAxisSpec = ICartesianAxisCommonSpec & IBandAxisSpec;
31
31
  export type ICartesianTimeAxisSpec = Omit<ICartesianAxisCommonSpec, 'inverse'> & {
32
32
  layers?: ITimeLayerType[];
33
33
  };
34
+ export type ICartesianLogAxisSpec = ICartesianLinearAxisSpec & {
35
+ base?: number;
36
+ };
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/axis/cartesian/interface/spec.ts"],"names":[],"mappings":"","file":"spec.js","sourcesContent":["import type { IOrientType, IRectMarkSpec, StringOrNumber } from '../../../../typings';\nimport type { IBandAxisSpec, ILinearAxisSpec, IGrid, ICommonAxisSpec } from '../../interface';\nimport type { ICartesianDomainLine, ICartesianLabel, ITimeLayerType, ICartesianTitle } from './common';\nimport type { AxisItemStateStyle } from '@visactor/vrender-components';\n\n/** spec */\nexport type ICartesianAxisSpec = ICartesianLinearAxisSpec | ICartesianBandAxisSpec | ICartesianTimeAxisSpec;\n\nexport type ICartesianAxisCommonSpec = ICommonAxisSpec & {\n /** 轴位置 */\n orient: IOrientType;\n /**\n * 网格线配置\n */\n grid?: IGrid;\n /**\n * 子网格线配置\n */\n subGrid?: IGrid;\n /**\n * 轴线配置\n */\n domainLine?: ICartesianDomainLine;\n /**\n * 轴标签配置\n */\n label?: ICartesianLabel;\n /**\n * 轴标题配置\n */\n title?: ICartesianTitle;\n /**\n * 是否进行自动缩进\n * 设置为 true 时,当轴元素超出绘图区会被裁剪时,会对图表增加额外的padding,使轴可以显示完整\n */\n autoIndent?: boolean;\n /**\n * 坐标轴背景配置\n */\n background?: {\n /**\n * 是否绘制坐标轴背景\n * @default false\n */\n visible: boolean;\n /**\n * 背景样式\n */\n style?: Partial<IRectMarkSpec>;\n /**\n * 背景在交互状态下的样式配置\n */\n state?: AxisItemStateStyle<Partial<IRectMarkSpec>>;\n };\n /**\n * 是否是3d模式的轴\n */\n mode?: '2d' | '3d';\n /**\n * 轴的z方向深度\n */\n depth?: number;\n};\n\nexport interface ILinearAxisSync {\n axisId: StringOrNumber;\n zeroAlign?: boolean;\n tickAlign?: boolean;\n}\n\nexport type ICartesianLinearAxisSpec = ICartesianAxisCommonSpec &\n ILinearAxisSpec & {\n sync?: ILinearAxisSync;\n };\n\nexport type ICartesianBandAxisSpec = ICartesianAxisCommonSpec & IBandAxisSpec;\n\nexport type ICartesianTimeAxisSpec = Omit<ICartesianAxisCommonSpec, 'inverse'> & {\n /**\n * 轴的层级配置。\n * layer[0] 为主轴,即离坐标轴线最近的轴\n * @description 目前仅支持单层 / 双层,即layers.length <= 2\n */\n layers?: ITimeLayerType[];\n};\n"]}
1
+ {"version":3,"sources":["../src/component/axis/cartesian/interface/spec.ts"],"names":[],"mappings":"","file":"spec.js","sourcesContent":["import type { IOrientType, IRectMarkSpec, StringOrNumber } from '../../../../typings';\nimport type { IBandAxisSpec, ILinearAxisSpec, IGrid, ICommonAxisSpec } from '../../interface';\nimport type { ICartesianDomainLine, ICartesianLabel, ITimeLayerType, ICartesianTitle } from './common';\nimport type { AxisItemStateStyle } from '@visactor/vrender-components';\n\n/** spec */\nexport type ICartesianAxisSpec =\n | ICartesianLinearAxisSpec\n | ICartesianBandAxisSpec\n | ICartesianTimeAxisSpec\n | ICartesianLogAxisSpec;\n\nexport type ICartesianAxisCommonSpec = ICommonAxisSpec & {\n /** 轴位置 */\n orient: IOrientType;\n /**\n * 网格线配置\n */\n grid?: IGrid;\n /**\n * 子网格线配置\n */\n subGrid?: IGrid;\n /**\n * 轴线配置\n */\n domainLine?: ICartesianDomainLine;\n /**\n * 轴标签配置\n */\n label?: ICartesianLabel;\n /**\n * 轴标题配置\n */\n title?: ICartesianTitle;\n /**\n * 是否进行自动缩进\n * 设置为 true 时,当轴元素超出绘图区会被裁剪时,会对图表增加额外的padding,使轴可以显示完整\n */\n autoIndent?: boolean;\n /**\n * 坐标轴背景配置\n */\n background?: {\n /**\n * 是否绘制坐标轴背景\n * @default false\n */\n visible: boolean;\n /**\n * 背景样式\n */\n style?: Partial<IRectMarkSpec>;\n /**\n * 背景在交互状态下的样式配置\n */\n state?: AxisItemStateStyle<Partial<IRectMarkSpec>>;\n };\n /**\n * 是否是3d模式的轴\n */\n mode?: '2d' | '3d';\n /**\n * 轴的z方向深度\n */\n depth?: number;\n};\n\nexport interface ILinearAxisSync {\n axisId: StringOrNumber;\n zeroAlign?: boolean;\n tickAlign?: boolean;\n}\n\nexport type ICartesianLinearAxisSpec = ICartesianAxisCommonSpec &\n ILinearAxisSpec & {\n sync?: ILinearAxisSync;\n };\n\nexport type ICartesianBandAxisSpec = ICartesianAxisCommonSpec & IBandAxisSpec;\n\nexport type ICartesianTimeAxisSpec = Omit<ICartesianAxisCommonSpec, 'inverse'> & {\n /**\n * 轴的层级配置。\n * layer[0] 为主轴,即离坐标轴线最近的轴\n * @description 目前仅支持单层 / 双层,即layers.length <= 2\n */\n layers?: ITimeLayerType[];\n};\n\nexport type ICartesianLogAxisSpec = ICartesianLinearAxisSpec & {\n /**\n * 底数\n * @default 10\n */\n base?: number;\n};\n"]}
@@ -1,3 +1,4 @@
1
+ import type { LogScale } from '@visactor/vscale';
1
2
  import { LinearScale } from '@visactor/vscale';
2
3
  import { CartesianAxis } from './axis';
3
4
  import type { IAxisHelper } from './interface';
@@ -13,8 +14,8 @@ export declare class CartesianLinearAxis extends CartesianAxis {
13
14
  protected _extend: {
14
15
  [key: string]: number;
15
16
  };
16
- protected _scale: LinearScale;
17
- protected _scales: LinearScale[];
17
+ protected _scale: LinearScale | LogScale;
18
+ protected _scales: LinearScale[] | LogScale[];
18
19
  setAttrFromSpec(): void;
19
20
  protected initScales(): void;
20
21
  protected computeDomain(data: {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/component/axis/cartesian/linear-axis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,E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,EAAE,CAAC;QAC/C,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzD,OAAO,MAAM,CAAC;IAChB,CAAC;;AAxCM,wBAAI,GAAG,iBAAiB,CAAC,mBAAmB,CAAC;AA2CtD,KAAK,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC","file":"linear-axis.js","sourcesContent":["import { LinearScale } from '@visactor/vscale';\nimport { CartesianAxis } from './axis';\nimport { isValid } from '../../../util';\nimport type { IAxisHelper } from './interface';\nimport { ComponentTypeEnum } from '../../interface';\nimport { getLinearAxisSpecDomain } from '../utils';\nimport { LinearAxisMixin } from '../mixin/linear-axis-mixin';\nimport { mixin } from '@visactor/vutils';\n\nexport interface CartesianLinearAxis\n extends Pick<\n LinearAxisMixin,\n | 'setExtraAttrFromSpec'\n | 'computeLinearDomain'\n | 'valueToPosition'\n | 'setScaleNice'\n | '_domain'\n | 'dataToPosition'\n | 'transformScaleDomain'\n | 'setExtendDomain'\n >,\n CartesianAxis {}\n\nexport class CartesianLinearAxis extends CartesianAxis {\n static type = ComponentTypeEnum.cartesianLinearAxis;\n type = ComponentTypeEnum.cartesianLinearAxis;\n\n protected _zero: boolean = true;\n protected _nice: boolean = true;\n protected _extend: { [key: string]: number } = {};\n\n protected _scale: LinearScale = new LinearScale();\n protected declare _scales: LinearScale[];\n\n setAttrFromSpec(): void {\n super.setAttrFromSpec();\n this.setExtraAttrFromSpec();\n this._domain = getLinearAxisSpecDomain(this._spec);\n }\n\n /**\n * @override\n */\n protected initScales() {\n super.initScales();\n const range = [0, 1];\n if (isValid(this._domain?.min)) {\n range[0] = this._domain.min;\n }\n if (isValid(this._domain?.max)) {\n range[1] = this._domain.max;\n }\n this._scale.domain(range);\n this.setScaleNice();\n }\n\n protected computeDomain(data: { min: number; max: number; values: any[] }[]): number[] {\n return this.computeLinearDomain(data);\n }\n\n protected axisHelper() {\n const helper: IAxisHelper = super.axisHelper();\n helper.setExtendDomain = this.setExtendDomain.bind(this);\n return helper;\n }\n}\n\nmixin(CartesianLinearAxis, LinearAxisMixin);\n"]}
1
+ {"version":3,"sources":["../src/component/axis/cartesian/linear-axis.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,aAAa,EAAE,MAAM,QAAQ,CAAC;AACvC,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,UAAU,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAgBzC,MAAM,OAAO,mBAAoB,SAAQ,aAAa;IAAtD;;QAEE,SAAI,GAAG,iBAAiB,CAAC,mBAAmB,CAAC;QAEnC,UAAK,GAAY,IAAI,CAAC;QACtB,UAAK,GAAY,IAAI,CAAC;QACtB,YAAO,GAA8B,EAAE,CAAC;QAExC,WAAM,GAA2B,IAAI,WAAW,EAAE,CAAC;IAkC/D,CAAC;IA/BC,eAAe;QACb,KAAK,CAAC,eAAe,EAAE,CAAC;QACxB,IAAI,CAAC,oBAAoB,EAAE,CAAC;QAC5B,IAAI,CAAC,OAAO,GAAG,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACrD,CAAC;IAKS,UAAU;;QAClB,KAAK,CAAC,UAAU,EAAE,CAAC;QACnB,MAAM,KAAK,GAAG,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QACrB,IAAI,OAAO,CAAC,MAAA,IAAI,CAAC,OAAO,0CAAE,GAAG,CAAC,EAAE;YAC9B,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;SAC7B;QACD,IAAI,OAAO,CAAC,MAAA,IAAI,CAAC,OAAO,0CAAE,GAAG,CAAC,EAAE;YAC9B,KAAK,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC;SAC7B;QACD,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QAC1B,IAAI,CAAC,YAAY,EAAE,CAAC;IACtB,CAAC;IAES,aAAa,CAAC,IAAmD;QACzE,OAAO,IAAI,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC;IACxC,CAAC;IAES,UAAU;QAClB,MAAM,MAAM,GAAgB,KAAK,CAAC,UAAU,EAAE,CAAC;QAC/C,MAAM,CAAC,eAAe,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACzD,OAAO,MAAM,CAAC;IAChB,CAAC;;AAxCM,wBAAI,GAAG,iBAAiB,CAAC,mBAAmB,CAAC;AA2CtD,KAAK,CAAC,mBAAmB,EAAE,eAAe,CAAC,CAAC","file":"linear-axis.js","sourcesContent":["import type { LogScale } from '@visactor/vscale';\nimport { LinearScale } from '@visactor/vscale';\nimport { CartesianAxis } from './axis';\nimport { isValid } from '../../../util';\nimport type { IAxisHelper } from './interface';\nimport { ComponentTypeEnum } from '../../interface';\nimport { getLinearAxisSpecDomain } from '../utils';\nimport { LinearAxisMixin } from '../mixin/linear-axis-mixin';\nimport { mixin } from '@visactor/vutils';\n\nexport interface CartesianLinearAxis\n extends Pick<\n LinearAxisMixin,\n | 'setExtraAttrFromSpec'\n | 'computeLinearDomain'\n | 'valueToPosition'\n | 'setScaleNice'\n | '_domain'\n | 'dataToPosition'\n | 'transformScaleDomain'\n | 'setExtendDomain'\n >,\n CartesianAxis {}\n\nexport class CartesianLinearAxis extends CartesianAxis {\n static type = ComponentTypeEnum.cartesianLinearAxis;\n type = ComponentTypeEnum.cartesianLinearAxis;\n\n protected _zero: boolean = true;\n protected _nice: boolean = true;\n protected _extend: { [key: string]: number } = {};\n\n protected _scale: LinearScale | LogScale = new LinearScale();\n protected declare _scales: LinearScale[] | LogScale[];\n\n setAttrFromSpec(): void {\n super.setAttrFromSpec();\n this.setExtraAttrFromSpec();\n this._domain = getLinearAxisSpecDomain(this._spec);\n }\n\n /**\n * @override\n */\n protected initScales() {\n super.initScales();\n const range = [0, 1];\n if (isValid(this._domain?.min)) {\n range[0] = this._domain.min;\n }\n if (isValid(this._domain?.max)) {\n range[1] = this._domain.max;\n }\n this._scale.domain(range);\n this.setScaleNice();\n }\n\n protected computeDomain(data: { min: number; max: number; values: any[] }[]): number[] {\n return this.computeLinearDomain(data);\n }\n\n protected axisHelper() {\n const helper: IAxisHelper = super.axisHelper();\n helper.setExtendDomain = this.setExtendDomain.bind(this);\n return helper;\n }\n}\n\nmixin(CartesianLinearAxis, LinearAxisMixin);\n"]}
@@ -0,0 +1,15 @@
1
+ import { CartesianLinearAxis } from './linear-axis';
2
+ import { ComponentTypeEnum } from '../../interface';
3
+ import { LinearAxisMixin } from '../mixin/linear-axis-mixin';
4
+ import { LogScale } from '@visactor/vscale';
5
+ export interface CartesianLogAxis extends Pick<LinearAxisMixin, 'valueToPosition' | 'dataToPosition'>, CartesianLinearAxis {
6
+ }
7
+ export declare class CartesianLogAxis extends CartesianLinearAxis {
8
+ static type: ComponentTypeEnum;
9
+ type: ComponentTypeEnum;
10
+ protected _zero: boolean;
11
+ protected _scale: LogScale;
12
+ protected _scales: LogScale[];
13
+ protected initScales(): void;
14
+ transformScaleDomain(): void;
15
+ }
@@ -0,0 +1,24 @@
1
+ import { CartesianLinearAxis } from "./linear-axis";
2
+
3
+ import { ComponentTypeEnum } from "../../interface";
4
+
5
+ import { LinearAxisMixin } from "../mixin/linear-axis-mixin";
6
+
7
+ import { LogScale } from "@visactor/vscale";
8
+
9
+ import { mixin } from "@visactor/vutils";
10
+
11
+ export class CartesianLogAxis extends CartesianLinearAxis {
12
+ constructor() {
13
+ super(...arguments), this.type = ComponentTypeEnum.cartesianLogAxis, this._zero = !1,
14
+ this._scale = new LogScale;
15
+ }
16
+ initScales() {
17
+ var _a;
18
+ super.initScales(), this._scale.base(null !== (_a = this._spec.base) && void 0 !== _a ? _a : 10);
19
+ }
20
+ transformScaleDomain() {}
21
+ }
22
+
23
+ CartesianLogAxis.type = ComponentTypeEnum.cartesianLogAxis, mixin(CartesianLogAxis, LinearAxisMixin);
24
+ //# sourceMappingURL=log-axis.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/component/axis/cartesian/log-axis.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,4BAA4B,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAMzC,MAAM,OAAO,gBAAiB,SAAQ,mBAAmB;IAAzD;;QAEE,SAAI,GAAG,iBAAiB,CAAC,gBAAgB,CAAC;QAEhC,UAAK,GAAY,KAAK,CAAC;QAEvB,WAAM,GAAa,IAAI,QAAQ,EAAE,CAAC;IAc9C,CAAC;IARW,UAAU;;QAClB,KAAK,CAAC,UAAU,EAAE,CAAC;QACnB,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,MAAA,IAAI,CAAC,KAAK,CAAC,IAAI,mCAAI,EAAE,CAAC,CAAC;IAC1C,CAAC;IAED,oBAAoB;IAEpB,CAAC;;AAlBM,qBAAI,GAAG,iBAAiB,CAAC,gBAAgB,CAAC;AAqBnD,KAAK,CAAC,gBAAgB,EAAE,eAAe,CAAC,CAAC","file":"log-axis.js","sourcesContent":["import { CartesianLinearAxis } from './linear-axis';\nimport { ComponentTypeEnum } from '../../interface';\nimport { LinearAxisMixin } from '../mixin/linear-axis-mixin';\nimport { LogScale } from '@visactor/vscale';\nimport { mixin } from '@visactor/vutils';\n\nexport interface CartesianLogAxis\n extends Pick<LinearAxisMixin, 'valueToPosition' | 'dataToPosition'>,\n CartesianLinearAxis {}\n\nexport class CartesianLogAxis extends CartesianLinearAxis {\n static type = ComponentTypeEnum.cartesianLogAxis;\n type = ComponentTypeEnum.cartesianLogAxis;\n\n protected _zero: boolean = false;\n\n protected _scale: LogScale = new LogScale();\n protected declare _scales: LogScale[];\n\n /**\n * @override\n */\n protected initScales() {\n super.initScales();\n this._scale.base(this._spec.base ?? 10);\n }\n\n transformScaleDomain() {\n // do nothing\n }\n}\n\nmixin(CartesianLogAxis, LinearAxisMixin);\n"]}
@@ -32,6 +32,8 @@ export declare class LinearAxisMixin {
32
32
  };
33
33
  setExtraAttrFromSpec(): void;
34
34
  transformScaleDomain(): void;
35
+ setLinearScaleNice(): void;
36
+ setLogScaleNice(): void;
35
37
  setScaleNice(): void;
36
38
  dataToPosition(values: any[], cfg?: IAxisLocationCfg): number;
37
39
  valueToPosition(value: any): number;
@@ -21,12 +21,19 @@ export class LinearAxisMixin {
21
21
  transformScaleDomain() {
22
22
  this.setScaleNice();
23
23
  }
24
- setScaleNice() {
24
+ setLinearScaleNice() {
25
25
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
26
26
  let tickCount = null !== (_d = null !== (_b = null === (_a = this._spec.tick) || void 0 === _a ? void 0 : _a.forceTickCount) && void 0 !== _b ? _b : null === (_c = this._spec.tick) || void 0 === _c ? void 0 : _c.tickCount) && void 0 !== _d ? _d : 10;
27
27
  "accurateFirst" === this._spec.niceType && (tickCount = Math.max(10, tickCount)),
28
28
  isNil(null === (_e = this._domain) || void 0 === _e ? void 0 : _e.min) && isNil(null === (_f = this._domain) || void 0 === _f ? void 0 : _f.max) ? this._nice && this._scale.nice(tickCount) : isValid(null === (_g = this._domain) || void 0 === _g ? void 0 : _g.min) && isNil(null === (_h = this._domain) || void 0 === _h ? void 0 : _h.max) ? this._nice && this._scale.niceMax(tickCount) : isNil(null === (_j = this._domain) || void 0 === _j ? void 0 : _j.min) && isValid(null === (_k = this._domain) || void 0 === _k ? void 0 : _k.max) && this._nice && this._scale.niceMin(tickCount);
29
29
  }
30
+ setLogScaleNice() {
31
+ var _a, _b, _c, _d, _e, _f;
32
+ isNil(null === (_a = this._domain) || void 0 === _a ? void 0 : _a.min) && isNil(null === (_b = this._domain) || void 0 === _b ? void 0 : _b.max) ? this._nice && this._scale.nice() : isValid(null === (_c = this._domain) || void 0 === _c ? void 0 : _c.min) && isNil(null === (_d = this._domain) || void 0 === _d ? void 0 : _d.max) ? this._nice && this._scale.niceMax() : isNil(null === (_e = this._domain) || void 0 === _e ? void 0 : _e.min) && isValid(null === (_f = this._domain) || void 0 === _f ? void 0 : _f.max) && this._nice && this._scale.niceMin();
33
+ }
34
+ setScaleNice() {
35
+ "log" === this._spec.type ? this.setLogScaleNice() : this.setLinearScaleNice();
36
+ }
30
37
  dataToPosition(values, cfg) {
31
38
  return this.valueToPosition(values[0]);
32
39
  }