@visactor/vchart 1.8.0-beta.0 → 1.8.0

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 (59) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.js +574 -633
  3. package/build/index.min.js +1 -1
  4. package/build/tsconfig.tsbuildinfo +1 -1
  5. package/cjs/core/index.d.ts +1 -1
  6. package/cjs/core/index.js +1 -1
  7. package/cjs/core/index.js.map +1 -1
  8. package/cjs/interaction/config.js +1 -1
  9. package/cjs/interaction/dimension-trigger.js +1 -1
  10. package/cjs/interaction/interaction.js +1 -1
  11. package/cjs/interaction/interface.js +1 -1
  12. package/cjs/layout/base-layout.js +1 -1
  13. package/cjs/layout/index.js +1 -1
  14. package/cjs/layout/interface.js +1 -1
  15. package/cjs/layout/layout-item.js +1 -1
  16. package/cjs/mark/text.js +2 -1
  17. package/cjs/mark/text.js.map +1 -1
  18. package/cjs/series/funnel/funnel.js +2 -1
  19. package/cjs/series/funnel/funnel.js.map +1 -1
  20. package/cjs/series/gauge/animation.d.ts +7 -0
  21. package/cjs/series/gauge/animation.js +37 -0
  22. package/cjs/series/gauge/animation.js.map +1 -0
  23. package/cjs/series/gauge/gauge-pointer.js +3 -3
  24. package/cjs/series/gauge/gauge-pointer.js.map +1 -1
  25. package/cjs/series/gauge/gauge.js +1 -1
  26. package/cjs/series/gauge/gauge.js.map +1 -1
  27. package/cjs/series/polar/progress-like/animation.d.ts +1 -1
  28. package/cjs/series/polar/progress-like/animation.js +3 -3
  29. package/cjs/series/polar/progress-like/animation.js.map +1 -1
  30. package/cjs/series/progress/circular/circular.js +1 -1
  31. package/cjs/series/progress/circular/circular.js.map +1 -1
  32. package/esm/core/index.d.ts +1 -1
  33. package/esm/core/index.js +1 -1
  34. package/esm/core/index.js.map +1 -1
  35. package/esm/interaction/config.js +1 -1
  36. package/esm/interaction/dimension-trigger.js +1 -1
  37. package/esm/interaction/interaction.js +1 -1
  38. package/esm/interaction/interface.js +1 -1
  39. package/esm/layout/base-layout.js +1 -1
  40. package/esm/layout/index.js +1 -1
  41. package/esm/layout/interface.js +1 -1
  42. package/esm/layout/layout-item.js +1 -1
  43. package/esm/mark/text.js +2 -2
  44. package/esm/mark/text.js.map +1 -1
  45. package/esm/series/funnel/funnel.js +2 -1
  46. package/esm/series/funnel/funnel.js.map +1 -1
  47. package/esm/series/gauge/animation.d.ts +7 -0
  48. package/esm/series/gauge/animation.js +29 -0
  49. package/esm/series/gauge/animation.js.map +1 -0
  50. package/esm/series/gauge/gauge-pointer.js +5 -3
  51. package/esm/series/gauge/gauge-pointer.js.map +1 -1
  52. package/esm/series/gauge/gauge.js +2 -2
  53. package/esm/series/gauge/gauge.js.map +1 -1
  54. package/esm/series/polar/progress-like/animation.d.ts +1 -1
  55. package/esm/series/polar/progress-like/animation.js +1 -1
  56. package/esm/series/polar/progress-like/animation.js.map +1 -1
  57. package/esm/series/progress/circular/circular.js +3 -3
  58. package/esm/series/progress/circular/circular.js.map +1 -1
  59. package/package.json +12 -12
@@ -1,7 +1,7 @@
1
1
  import { VChart } from './vchart';
2
2
  import { Factory } from './factory';
3
3
  export { VChart, Factory };
4
- export declare const version = "1.8.0-beta.0";
4
+ export declare const version = "1.8.0";
5
5
  export type { IVChart } from './interface';
6
6
  export type { IStateSpec, StateValueType } from '../compile/mark';
7
7
  export * from '../typings/spec/common';
package/cjs/core/index.js CHANGED
@@ -35,7 +35,7 @@ Object.defineProperty(exports, "Factory", {
35
35
  get: function() {
36
36
  return factory_1.Factory;
37
37
  }
38
- }), exports.version = "1.8.0-beta.0", __exportStar(require("../typings/spec/common"), exports),
38
+ }), exports.version = "1.8.0", __exportStar(require("../typings/spec/common"), exports),
39
39
  __exportStar(require("../event/interface"), exports), __exportStar(require("../theme/interface"), exports),
40
40
  __exportStar(require("../constant"), exports), __exportStar(require("../typings/spec/index"), exports),
41
41
  __exportStar(require("../theme/index"), exports);
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA,qCAAkC;AAGzB,uFAHA,eAAM,OAGA;AAFf,uCAAoC;AAEnB,wFAFR,iBAAO,OAEQ;AAGX,QAAA,OAAO,GAAG,cAAc,CAAC;AAMtC,yDAAuC;AACvC,qDAAmC;AACnC,qDAAmC;AACnC,8CAA4B;AAK5B,wDAAsC;AAGtC,iDAA+B;AAG/B,uDAAiD;AAAxC,uGAAA,OAAO,OAAA;AAGhB,4CAA0B","file":"index.js","sourcesContent":["/**\n * @description The core module of VChart, containing the necessary interfaces for using VChart.\n */\n\nimport { VChart } from './vchart';\nimport { Factory } from './factory';\n\nexport { VChart, Factory };\n\n// export the version\nexport const version = \"1.8.0-beta.0\";\n\n// export necessary types\nexport type { IVChart } from './interface';\nexport type { IStateSpec, StateValueType } from '../compile/mark';\n\nexport * from '../typings/spec/common';\nexport * from '../event/interface';\nexport * from '../theme/interface';\nexport * from '../constant';\n\n/**\n * spec\n */\nexport * from '../typings/spec/index';\n\n// theme\nexport * from '../theme/index';\n\n// vrender\nexport { vglobal } from '@visactor/vrender-core';\n\n// plugin\nexport * from '../plugin';\n"]}
1
+ {"version":3,"sources":["../src/core/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAIA,qCAAkC;AAGzB,uFAHA,eAAM,OAGA;AAFf,uCAAoC;AAEnB,wFAFR,iBAAO,OAEQ;AAGX,QAAA,OAAO,GAAG,OAAO,CAAC;AAM/B,yDAAuC;AACvC,qDAAmC;AACnC,qDAAmC;AACnC,8CAA4B;AAK5B,wDAAsC;AAGtC,iDAA+B;AAG/B,uDAAiD;AAAxC,uGAAA,OAAO,OAAA;AAGhB,4CAA0B","file":"index.js","sourcesContent":["/**\n * @description The core module of VChart, containing the necessary interfaces for using VChart.\n */\n\nimport { VChart } from './vchart';\nimport { Factory } from './factory';\n\nexport { VChart, Factory };\n\n// export the version\nexport const version = \"1.8.0\";\n\n// export necessary types\nexport type { IVChart } from './interface';\nexport type { IStateSpec, StateValueType } from '../compile/mark';\n\nexport * from '../typings/spec/common';\nexport * from '../event/interface';\nexport * from '../theme/interface';\nexport * from '../constant';\n\n/**\n * spec\n */\nexport * from '../typings/spec/index';\n\n// theme\nexport * from '../theme/index';\n\n// vrender\nexport { vglobal } from '@visactor/vrender-core';\n\n// plugin\nexport * from '../plugin';\n"]}
@@ -31,4 +31,4 @@ function getDefaultInteractionConfigByMode(mode) {
31
31
  }
32
32
 
33
33
  exports.getDefaultInteractionConfigByMode = getDefaultInteractionConfigByMode;
34
- //# sourceMappingURL=config.js.map
34
+ //# sourceMappingURL=config.js.map
@@ -93,4 +93,4 @@ class DimensionTrigger {
93
93
  }
94
94
 
95
95
  exports.DimensionTrigger = DimensionTrigger;
96
- //# sourceMappingURL=dimension-trigger.js.map
96
+ //# sourceMappingURL=dimension-trigger.js.map
@@ -82,4 +82,4 @@ class Interaction {
82
82
  }
83
83
 
84
84
  exports.Interaction = Interaction;
85
- //# sourceMappingURL=interaction.js.map
85
+ //# sourceMappingURL=interaction.js.map
@@ -3,4 +3,4 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  });
6
- //# sourceMappingURL=interface.js.map
6
+ //# sourceMappingURL=interface.js.map
@@ -157,4 +157,4 @@ class Layout {
157
157
  }
158
158
 
159
159
  exports.Layout = Layout, Layout.type = "base";
160
- //# sourceMappingURL=base-layout.js.map
160
+ //# sourceMappingURL=base-layout.js.map
@@ -40,4 +40,4 @@ Object.defineProperty(exports, "Layout3d", {
40
40
  return layout3d_1.registerLayout3d;
41
41
  }
42
42
  });
43
- //# sourceMappingURL=index.js.map
43
+ //# sourceMappingURL=index.js.map
@@ -3,4 +3,4 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  });
6
- //# sourceMappingURL=interface.js.map
6
+ //# sourceMappingURL=interface.js.map
@@ -221,4 +221,4 @@ class LayoutItem {
221
221
  }
222
222
 
223
223
  exports.LayoutItem = LayoutItem;
224
- //# sourceMappingURL=layout-item.js.map
224
+ //# sourceMappingURL=layout-item.js.map
package/cjs/mark/text.js CHANGED
@@ -28,7 +28,8 @@ class TextMark extends base_mark_1.BaseMark {
28
28
  exports.TextMark = TextMark, TextMark.type = interface_1.MarkTypeEnum.text;
29
29
 
30
30
  const registerTextMark = () => {
31
- factory_1.Factory.registerMark(TextMark.type, TextMark), (0, vgrammar_core_1.registerTextGraphic)();
31
+ factory_1.Factory.registerMark(TextMark.type, TextMark), (0, vgrammar_core_1.registerTextGraphic)(),
32
+ (0, vgrammar_core_1.registerRichTextGraphic)();
32
33
  };
33
34
 
34
35
  exports.registerTextMark = registerTextMark;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/mark/text.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAE5C,gDAA4C;AAG5C,2CAA2C;AAC3C,2DAA+E;AAK/E,MAAa,QAAS,SAAQ,oBAAuB;IAArD;;QAEW,SAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;IA4BhC,CAAC;IA1BW,gBAAgB;QACxB,MAAM,YAAY,mCACb,KAAK,CAAC,gBAAgB,EAAE,KAE3B,KAAK,EAAE,CAAC,EACR,SAAS,EAAE,QAAQ,EACnB,SAAS,EAAE,CAAC,EACZ,UAAU,EAAE,EAAE,GACf,CAAC;QACF,OAAO,YAAY,CAAC;IACtB,CAAC;IAES,YAAY,CAAC,KAA2B;QAChD,MAAM,IAAI,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAGpC,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAE/B,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,MAAM,EAAE;YACxC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,+BAAe,CAAC,QAA2B,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;SACvG;aAAM;YACL,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,+BAAe,CAAC,IAAuB,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;SACnG;QAED,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;IAC/B,CAAC;;AA7BH,4BA8BC;AA7BiB,aAAI,GAAG,wBAAY,CAAC,IAAI,CAAC;AA+BpC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,iBAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC9C,IAAA,mCAAmB,GAAE,CAAC;AACxB,CAAC,CAAC;AAHW,QAAA,gBAAgB,oBAG3B","file":"text.js","sourcesContent":["import { Factory } from './../core/factory';\nimport type { ITextMarkSpec } from '../typings/visual';\nimport { BaseMark } from './base/base-mark';\nimport type { IMarkRaw, IMarkStyle } from './interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { MarkTypeEnum } from './interface';\nimport { GrammarMarkType, registerTextGraphic } from '@visactor/vgrammar-core';\nimport type { IGroupMark } from '@visactor/vgrammar-core';\n\nexport type ITextMark = IMarkRaw<ITextMarkSpec>;\n\nexport class TextMark extends BaseMark<ITextMarkSpec> implements ITextMark {\n static readonly type = MarkTypeEnum.text;\n readonly type = TextMark.type;\n\n protected _getDefaultStyle() {\n const defaultStyle: IMarkStyle<ITextMarkSpec> = {\n ...super._getDefaultStyle(),\n // TODO: 删除后会有显示问题,待排查\n angle: 0,\n textAlign: 'center',\n lineWidth: 0,\n textConfig: []\n };\n return defaultStyle;\n }\n\n protected _initProduct(group?: string | IGroupMark) {\n const view = this.getVGrammarView();\n\n // 声明语法元素\n const id = this.getProductId();\n\n if (this.getStyle('textType') === 'rich') {\n this._product = view.mark(GrammarMarkType.richtext as GrammarMarkType, group ?? view.rootMark).id(id);\n } else {\n this._product = view.mark(GrammarMarkType.text as GrammarMarkType, group ?? view.rootMark).id(id);\n }\n\n this._compiledProductId = id;\n }\n}\n\nexport const registerTextMark = () => {\n Factory.registerMark(TextMark.type, TextMark);\n registerTextGraphic();\n};\n"]}
1
+ {"version":3,"sources":["../src/mark/text.ts"],"names":[],"mappings":";;;AAAA,+CAA4C;AAE5C,gDAA4C;AAG5C,2CAA2C;AAC3C,2DAAwG;AAKxG,MAAa,QAAS,SAAQ,oBAAuB;IAArD;;QAEW,SAAI,GAAG,QAAQ,CAAC,IAAI,CAAC;IA4BhC,CAAC;IA1BW,gBAAgB;QACxB,MAAM,YAAY,mCACb,KAAK,CAAC,gBAAgB,EAAE,KAE3B,KAAK,EAAE,CAAC,EACR,SAAS,EAAE,QAAQ,EACnB,SAAS,EAAE,CAAC,EACZ,UAAU,EAAE,EAAE,GACf,CAAC;QACF,OAAO,YAAY,CAAC;IACtB,CAAC;IAES,YAAY,CAAC,KAA2B;QAChD,MAAM,IAAI,GAAG,IAAI,CAAC,eAAe,EAAE,CAAC;QAGpC,MAAM,EAAE,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAE/B,IAAI,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,KAAK,MAAM,EAAE;YACxC,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,+BAAe,CAAC,QAA2B,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;SACvG;aAAM;YACL,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,+BAAe,CAAC,IAAuB,EAAE,KAAK,aAAL,KAAK,cAAL,KAAK,GAAI,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;SACnG;QAED,IAAI,CAAC,kBAAkB,GAAG,EAAE,CAAC;IAC/B,CAAC;;AA7BH,4BA8BC;AA7BiB,aAAI,GAAG,wBAAY,CAAC,IAAI,CAAC;AA+BpC,MAAM,gBAAgB,GAAG,GAAG,EAAE;IACnC,iBAAO,CAAC,YAAY,CAAC,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC9C,IAAA,mCAAmB,GAAE,CAAC;IACtB,IAAA,uCAAuB,GAAE,CAAC;AAC5B,CAAC,CAAC;AAJW,QAAA,gBAAgB,oBAI3B","file":"text.js","sourcesContent":["import { Factory } from './../core/factory';\nimport type { ITextMarkSpec } from '../typings/visual';\nimport { BaseMark } from './base/base-mark';\nimport type { IMarkRaw, IMarkStyle } from './interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { MarkTypeEnum } from './interface';\nimport { GrammarMarkType, registerRichTextGraphic, registerTextGraphic } from '@visactor/vgrammar-core';\nimport type { IGroupMark } from '@visactor/vgrammar-core';\n\nexport type ITextMark = IMarkRaw<ITextMarkSpec>;\n\nexport class TextMark extends BaseMark<ITextMarkSpec> implements ITextMark {\n static readonly type = MarkTypeEnum.text;\n readonly type = TextMark.type;\n\n protected _getDefaultStyle() {\n const defaultStyle: IMarkStyle<ITextMarkSpec> = {\n ...super._getDefaultStyle(),\n // TODO: 删除后会有显示问题,待排查\n angle: 0,\n textAlign: 'center',\n lineWidth: 0,\n textConfig: []\n };\n return defaultStyle;\n }\n\n protected _initProduct(group?: string | IGroupMark) {\n const view = this.getVGrammarView();\n\n // 声明语法元素\n const id = this.getProductId();\n\n if (this.getStyle('textType') === 'rich') {\n this._product = view.mark(GrammarMarkType.richtext as GrammarMarkType, group ?? view.rootMark).id(id);\n } else {\n this._product = view.mark(GrammarMarkType.text as GrammarMarkType, group ?? view.rootMark).id(id);\n }\n\n this._compiledProductId = id;\n }\n}\n\nexport const registerTextMark = () => {\n Factory.registerMark(TextMark.type, TextMark);\n registerTextGraphic();\n registerRichTextGraphic();\n};\n"]}
@@ -230,7 +230,8 @@ class FunnelSeries extends base_series_1.BaseSeries {
230
230
  return !!(null == datum ? void 0 : datum[funnel_2.FUNNEL_TRANSFORM_LEVEL]);
231
231
  }
232
232
  _buildMarkAttributeContext() {
233
- super._buildMarkAttributeContext(), this._markAttributeContext.valueToPosition = this.valueToPosition.bind(this);
233
+ super._buildMarkAttributeContext(), this._markAttributeContext.valueToPosition = this.valueToPosition.bind(this),
234
+ this._markAttributeContext.getPoints = this.getPoints.bind(this), this._markAttributeContext.isTransformLevel = this.isTransformLevel.bind(this);
234
235
  }
235
236
  valueToPosition(category) {
236
237
  var _a, _b, _c;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/series/funnel/funnel.ts"],"names":[],"mappings":";;;AAEA,4CAAuD;AAEvD,4CAAmD;AAEnD,qDAAiD;AACjD,6CAAwD;AACxD,kDAAuE;AACvE,iDAA8C;AAE9C,oDAAyD;AAEzD,yDAAuE;AACvE,kDAe+B;AAE/B,4CAAoD;AACpD,8CAA0C;AAG1C,qDAA6D;AAC7D,6CAAwE;AACxE,mDAIgC;AAChC,iDAAgG;AAChG,qDAAiD;AAEjD,wDAA8E;AAC9E,0CAA6D;AAC7D,0CAA6D;AAC7D,yCAA8C;AAG9C,gDAA6C;AAC7C,6DAAmE;AAEnE,MAAa,YACX,SAAQ,wBAAa;IADvB;;QAKE,SAAI,GAAG,qBAAc,CAAC,MAAM,CAAC;QACnB,oBAAe,GAAuB,yBAAkB,CAAC,MAAM,CAAC;QAChE,oBAAe,GAAiB,mBAAY,CAAC,OAAO,CAAC;QACrD,uBAAkB,GAAuB,yBAAkB,CAAC,SAAS,CAAC;QACtE,uBAAkB,GAAiB,mBAAY,CAAC,OAAO,CAAC;QAIzD,2BAAsB,GAAG,gDAA2B,CAAC;QA0BpD,gBAAW,GAAwB,IAAI,CAAC;QACxC,yBAAoB,GAAwB,IAAI,CAAC;QACjD,eAAU,GAAsB,IAAI,CAAC;QACrC,wBAAmB,GAAsB,IAAI,CAAC;QAC9C,0BAAqB,GAA4C,EAAE,CAAC;IAivBhF,CAAC;IA5wBC,gBAAgB;QACd,OAAO,IAA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EO,UAAU;QAChB,OAAO,IAAI,CAAC,aAAa,KAAK,QAAQ,IAAI,IAAI,CAAC,aAAa,KAAK,OAAO,CAAC;IAC3E,CAAC;IAED,mBAAmB;QACjB,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,cAAc;QACZ,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC5B,CAAC;;AA3xBH,oCA4xBC;AAxxBiB,iBAAI,GAAW,qBAAc,CAAC,MAAM,CAAC;AAOrC,iBAAI,GAAkB,2BAAgB,CAAC;AACvC,mCAAsB,GAAG,gDAAkC,CAAC;AAkxBvE,MAAM,oBAAoB,GAAG,GAAG,EAAE;IACvC,IAAA,6BAAmB,GAAE,CAAC;IACtB,IAAA,uBAAgB,GAAE,CAAC;IACnB,IAAA,uBAAgB,GAAE,CAAC;IACnB,iBAAO,CAAC,cAAc,CAAC,YAAY,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;IACxD,iBAAO,CAAC,iBAAiB,CAAC,QAAQ,EAAE,CAAC,MAAW,EAAE,MAA0B,EAAE,EAAE,CAAC,iBAC/E,MAAM,EAAE,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,IACzD,2BAAkB,EACrB,CAAC,CAAC;IACJ,IAAA,4CAAmC,GAAE,CAAC;IACtC,IAAA,mCAA0B,GAAE,CAAC;AAC/B,CAAC,CAAC;AAXW,QAAA,oBAAoB,wBAW/B","file":"funnel.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport type { IFunnelSeries, SeriesMarkMap } from '../interface';\nimport { SeriesMarkNameEnum } from '../interface/type';\nimport type { IOrientType, IPoint, TextAlign, TextBaseLine, Maybe, Datum, StringOrNumber } from '../../typings';\nimport { SeriesTypeEnum } from '../interface/type';\nimport type { IPolygonMark } from '../../mark/polygon/polygon';\nimport { BaseSeries } from '../base/base-series';\nimport { AttributeLevel, PREFIX } from '../../constant';\nimport { registerDataSetInstanceTransform } from '../../data/register';\nimport { DataView } from '@visactor/vdataset';\nimport type { IMark } from '../../mark/interface';\nimport { MarkTypeEnum } from '../../mark/interface/type';\nimport type { IFunnelOpt } from '../../data/transforms/funnel';\nimport { funnel, funnelTransform } from '../../data/transforms/funnel';\nimport {\n FUNNEL_CURRENT_VALUE,\n FUNNEL_HEIGHT_RATIO,\n FUNNEL_LABEL_LINE_LENGTH,\n FUNNEL_LABEL_SPACE_WIDTH,\n FUNNEL_LAST_VALUE,\n FUNNEL_LAST_VALUE_RATIO,\n FUNNEL_MAX_SIZE,\n FUNNEL_MIN_SIZE,\n FUNNEL_NEXT_VALUE,\n FUNNEL_NEXT_VALUE_RATIO,\n FUNNEL_REACH_RATIO,\n FUNNEL_TRANSFORM_LEVEL,\n FUNNEL_TRANSFORM_RATIO,\n FUNNEL_VALUE_RATIO\n} from '../../constant/funnel';\nimport type { ITextMark } from '../../mark/text';\nimport { calcLayoutNumber } from '../../util/space';\nimport { field } from '../../util/object';\nimport type { FunnelAppearPreset, IFunnelSeriesSpec, IFunnelSeriesTheme } from './interface';\nimport type { IRuleMark } from '../../mark/rule';\nimport { FunnelSeriesTooltipHelper } from './tooltip-helper';\nimport { isFunction, isValid, merge, isNumber } from '@visactor/vutils';\nimport {\n FadeInOutAnimation,\n registerCartesianGroupClipAnimation,\n registerFadeInOutAnimation\n} from '../../animation/config';\nimport { animationConfig, shouldMarkDoMorph, userAnimationConfig } from '../../animation/utils';\nimport { SeriesData } from '../base/series-data';\nimport type { IStateAnimateSpec } from '../../animation/spec';\nimport { PolygonMark, registerPolygonMark } from '../../mark/polygon/polygon';\nimport { TextMark, registerTextMark } from '../../mark/text';\nimport { RuleMark, registerRuleMark } from '../../mark/rule';\nimport { funnelSeriesMark } from './constant';\nimport type { ILabelMark } from '../../mark/label';\nimport type { LabelItem } from '@visactor/vrender-components';\nimport { Factory } from '../../core/factory';\nimport { FunnelSeriesSpecTransformer } from './funnel-transformer';\n\nexport class FunnelSeries<T extends IFunnelSeriesSpec = IFunnelSeriesSpec>\n extends BaseSeries<T>\n implements IFunnelSeries\n{\n static readonly type: string = SeriesTypeEnum.funnel;\n type = SeriesTypeEnum.funnel;\n protected _funnelMarkName: SeriesMarkNameEnum = SeriesMarkNameEnum.funnel;\n protected _funnelMarkType: MarkTypeEnum = MarkTypeEnum.polygon;\n protected _transformMarkName: SeriesMarkNameEnum = SeriesMarkNameEnum.transform;\n protected _transformMarkType: MarkTypeEnum = MarkTypeEnum.polygon;\n\n static readonly mark: SeriesMarkMap = funnelSeriesMark;\n static readonly transformerConstructor = FunnelSeriesSpecTransformer as any;\n readonly transformerConstructor = FunnelSeriesSpecTransformer;\n\n protected _categoryField!: string;\n getCategoryField() {\n return this._categoryField;\n }\n setCategoryField(f: string): string {\n this._categoryField = f;\n return this._categoryField;\n }\n\n protected _valueField!: string;\n getValueField() {\n return this._valueField;\n }\n setValueField(f: string): string {\n this._valueField = f;\n return this._valueField;\n }\n\n protected _viewDataTransform!: SeriesData;\n\n protected _funnelAlign: 'left' | 'center' | 'right' | 'top' | 'bottom';\n protected _funnelOrient: IOrientType;\n protected _shape: 'rect' | 'trapezoid';\n\n protected _funnelMark: IPolygonMark | null = null;\n protected _funnelTransformMark: IPolygonMark | null = null;\n protected _labelMark: ILabelMark | null = null;\n protected _transformLabelMark: ILabelMark | null = null;\n protected _funnelOuterLabelMark: { label?: ITextMark; line?: IRuleMark } = {};\n\n setAttrFromSpec(): void {\n super.setAttrFromSpec();\n\n this.setCategoryField(this._spec.categoryField);\n this.setValueField(this._spec.valueField);\n\n this._funnelOrient = this._spec.funnelOrient ?? 'top';\n this._shape = this._spec.shape ?? 'trapezoid';\n\n if (this._isHorizontal()) {\n this._funnelAlign = ['top', 'bottom'].includes(this._spec.funnelAlign) ? this._spec.funnelAlign : 'center';\n } else {\n this._funnelAlign = ['left', 'right'].includes(this._spec.funnelAlign) ? this._spec.funnelAlign : 'center';\n }\n\n if (this._spec.categoryField) {\n this.setSeriesField(this._spec.categoryField);\n }\n }\n\n initData() {\n super.initData();\n if (!this._data) {\n return;\n }\n\n registerDataSetInstanceTransform(this._dataSet, 'funnel', funnel);\n registerDataSetInstanceTransform(this._dataSet, 'funnelTransform', funnelTransform);\n\n const viewDataTransform = new DataView(this._dataSet, { name: `${PREFIX}_series_${this.id}_viewDataTransform` });\n viewDataTransform.parse([this.getViewData()], {\n type: 'dataview'\n });\n\n this._viewDataTransform = new SeriesData(this._option, viewDataTransform);\n }\n\n getStatisticFields() {\n const fields: { key: string; operations: Array<'max' | 'min' | 'values'> }[] = [];\n fields.push({ key: this._categoryField, operations: ['values'] });\n fields.push({ key: this._valueField, operations: ['max', 'min'] });\n return fields;\n }\n\n protected _statisticViewData(): void {\n super._statisticViewData();\n this._data.getDataView().transform({\n type: 'funnel',\n options: {\n valueField: this.getValueField(),\n isCone: this._spec.isCone,\n // heightVisual: true,\n asCurrentValue: FUNNEL_CURRENT_VALUE,\n asTransformRatio: FUNNEL_TRANSFORM_RATIO,\n asReachRatio: FUNNEL_REACH_RATIO,\n asHeightRatio: FUNNEL_HEIGHT_RATIO,\n asValueRatio: FUNNEL_VALUE_RATIO,\n asNextValueRatio: FUNNEL_NEXT_VALUE_RATIO,\n asLastValueRatio: FUNNEL_LAST_VALUE_RATIO,\n asLastValue: FUNNEL_LAST_VALUE,\n asNextValue: FUNNEL_NEXT_VALUE,\n range: {\n min: this._spec.range?.min ?? this.getViewDataStatistics().latestData?.[this.getValueField()]?.min,\n max: this._spec.range?.max ?? this.getViewDataStatistics().latestData?.[this.getValueField()]?.max\n }\n } as IFunnelOpt\n });\n\n this._viewDataTransform.getDataView()?.transform({\n type: 'funnelTransform',\n options: { asIsTransformLevel: FUNNEL_TRANSFORM_LEVEL }\n });\n }\n\n initMark() {\n this._funnelMark = this._createMark(\n {\n ...FunnelSeries.mark.funnel,\n name: this._funnelMarkName,\n type: this._funnelMarkType\n },\n {\n themeSpec: this._theme?.funnel,\n morph: shouldMarkDoMorph(this._spec, this._funnelMarkName),\n defaultMorphElementKey: this._seriesField,\n key: this._seriesField,\n groupKey: this._seriesField,\n isSeriesMark: true,\n customShape: this._spec.funnel?.customShape\n }\n ) as IPolygonMark;\n\n if (this._spec.isTransform) {\n this._funnelTransformMark = this._createMark(\n {\n ...FunnelSeries.mark.transform,\n name: this._transformMarkName,\n type: this._transformMarkType\n },\n {\n themeSpec: this._theme?.transform,\n key: this._seriesField,\n skipBeforeLayouted: false,\n dataView: this._viewDataTransform.getDataView(),\n dataProductId: this._viewDataTransform.getProductId(),\n customShape: this._spec.transform?.customShape\n }\n );\n }\n\n if (this._spec?.outerLabel?.visible) {\n const { line } = this._spec.outerLabel ?? {};\n const { line: lineTheme } = this._theme?.outerLabel ?? {};\n\n this._funnelOuterLabelMark.label = this._createMark(FunnelSeries.mark.outerLabel, {\n themeSpec: this._theme?.outerLabel,\n key: this._seriesField,\n markSpec: this._spec.outerLabel,\n skipBeforeLayouted: true\n }) as ITextMark;\n\n this._funnelOuterLabelMark.line = this._createMark(FunnelSeries.mark.outerLabelLine, {\n themeSpec: lineTheme,\n key: this._seriesField,\n markSpec: line,\n depend: [this._funnelOuterLabelMark.label]\n }) as IRuleMark;\n }\n }\n\n protected initTooltip() {\n this._tooltipHelper = new FunnelSeriesTooltipHelper(this);\n this._funnelMark && this._tooltipHelper.activeTriggerSet.mark.add(this._funnelMark);\n this._funnelTransformMark && this._tooltipHelper.activeTriggerSet.mark.add(this._funnelTransformMark);\n }\n\n getDimensionField(): string[] {\n return this._seriesField ? [this._seriesField] : [];\n }\n getMeasureField(): string[] {\n return [this._valueField];\n }\n\n getGroupFields(): string[] {\n return null;\n }\n\n initMarkStyle() {\n const funnelMark = this._funnelMark;\n if (funnelMark) {\n this.setMarkStyle(\n funnelMark,\n {\n points: (datum: Datum) => this.getPoints(datum),\n visible: (datum: Datum) => isValid(datum[this._valueField]),\n fill: this.getColorAttribute()\n },\n 'normal',\n AttributeLevel.Series\n );\n this._trigger.registerMark(funnelMark);\n }\n\n const funnelTransformMark = this._funnelTransformMark;\n if (funnelTransformMark) {\n this.setMarkStyle(\n funnelTransformMark,\n { points: (datum: Datum) => this.getPoints(datum) },\n 'normal',\n AttributeLevel.Series\n );\n this._trigger.registerMark(funnelTransformMark);\n }\n\n const outerLabelMark = this._funnelOuterLabelMark.label;\n if (outerLabelMark) {\n this.setMarkStyle(\n outerLabelMark,\n {\n text: (datum: Datum) => {\n const text = `${datum[this.getCategoryField()]}`;\n if (isFunction(this._spec.outerLabel.formatMethod)) {\n return this._spec.outerLabel.formatMethod(text, datum);\n }\n return text;\n },\n x: (datum: Datum) => this._computeOuterLabelPosition(datum).x,\n y: (datum: Datum) => this._computeOuterLabelPosition(datum).y,\n textAlign: (datum: Datum) => this._computeOuterLabelPosition(datum).align,\n textBaseline: (datum: Datum) => this._computeOuterLabelPosition(datum).textBaseline,\n limit: (datum: Datum) => this._computeOuterLabelLimit(datum)\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n const outerLabelLineMark = this._funnelOuterLabelMark.line;\n if (outerLabelLineMark && outerLabelMark) {\n this.setMarkStyle(\n outerLabelLineMark,\n {\n x: (datum: Datum) => this._computeOuterLabelLinePosition(datum).x1,\n y: (datum: Datum) => this._computeOuterLabelLinePosition(datum).y1,\n x1: (datum: Datum) => this._computeOuterLabelLinePosition(datum).x2,\n y1: (datum: Datum) => this._computeOuterLabelLinePosition(datum).y2\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n }\n\n initLabelMarkStyle(labelMark?: ILabelMark) {\n if (!labelMark) {\n return;\n }\n\n const target = labelMark.getTarget();\n const component = labelMark.getComponent();\n\n if (target === this._funnelMark) {\n this._labelMark = labelMark;\n this.setMarkStyle(\n labelMark,\n {\n text: (datum: Datum) => `${datum[this.getCategoryField()]} ${datum[this.getValueField()]}`,\n x: (datum: Datum) => this._computeLabelPosition(datum).x,\n y: (datum: Datum) => this._computeLabelPosition(datum).y,\n maxLineWidth: (datum: Datum) => this._computeLabelLimit(datum, this._spec.label),\n stroke: this.getColorAttribute()\n },\n 'normal',\n AttributeLevel.Series\n );\n if (this._funnelOuterLabelMark?.label) {\n this._funnelOuterLabelMark.label.setDepend(component);\n }\n\n if (this._funnelOuterLabelMark?.line) {\n this._funnelOuterLabelMark.line.setDepend(...this._funnelOuterLabelMark.line.getDepend());\n }\n } else if (this._funnelTransformMark && target === this._funnelTransformMark) {\n this._transformLabelMark = labelMark;\n this.setMarkStyle(\n labelMark,\n {\n text: (datum: Datum) => {\n const ratio = field(FUNNEL_REACH_RATIO).bind(this)(datum) as number;\n return `${(ratio * 100).toFixed(1)}%`;\n },\n x: (datum: Datum) => this._computeLabelPosition(datum).x,\n y: (datum: Datum) => this._computeLabelPosition(datum).y,\n maxLineWidth: (datum: Datum) => this._computeLabelLimit(datum, this._spec.transformLabel)\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n }\n\n initAnimation() {\n const appearPreset = (this._spec?.animationAppear as IStateAnimateSpec<FunnelAppearPreset>)?.preset ?? 'clipIn';\n if (appearPreset === 'clipIn') {\n if (this._rootMark) {\n this._rootMark.setAnimationConfig(\n animationConfig(\n Factory.getAnimationInKey('cartesianGroupClip')?.(\n {\n direction: () => (this._isHorizontal() ? 'x' : 'y'),\n width: () => this.getLayoutRect().width,\n height: () => this.getLayoutRect().height,\n orient: () => (this._isReverse() ? 'negative' : 'positive')\n },\n appearPreset\n ),\n userAnimationConfig(SeriesMarkNameEnum.group, this._spec, this._markAttributeContext)\n )\n );\n }\n }\n [this._funnelOuterLabelMark?.label].forEach(m => {\n if (m) {\n m.setAnimationConfig(\n animationConfig(\n Factory.getAnimationInKey('fadeInOut')(),\n userAnimationConfig(m.name, this._spec, this._markAttributeContext)\n )\n );\n }\n });\n\n [this._funnelMark, this._funnelTransformMark].forEach(m => {\n if (m) {\n m.setAnimationConfig(\n animationConfig(\n Factory.getAnimationInKey('funnel')({}, appearPreset),\n userAnimationConfig(m.name, this._spec, this._markAttributeContext)\n )\n );\n }\n });\n\n if (this._funnelOuterLabelMark?.line) {\n this._funnelOuterLabelMark.line.setAnimationConfig(\n animationConfig(\n Factory.getAnimationInKey('fadeInOut')?.(),\n userAnimationConfig(SeriesMarkNameEnum.outerLabelLine, this._spec, this._markAttributeContext)\n )\n );\n }\n }\n // hack group\n initGroups() {\n // do nothing\n }\n\n // handle stack\n getStackGroupFields(): string[] {\n return [];\n }\n\n getStackValueField(): string {\n // hack\n return null;\n }\n\n /** event */\n protected initEvent() {\n super.initEvent();\n // 同步更新转化层数据\n this._viewDataTransform.getDataView()?.target.addListener('change', (d: DataView) => {\n this._viewDataTransform.updateData();\n });\n }\n\n /**\n *\n * P0 ----------- P1 P2 ------ P3\n * \\ / / \\\n * P3 ------ P2 P1 ---------- P0\n *\n * P1 P0\n * |\\ P2 P3 /|\n * | | | |\n * |/ P3 P2 \\|\n * P0 P1\n */\n getPoints(datum: Datum) {\n // 对特殊数据层不进行绘制\n const isTransformLevel = this.isTransformLevel(datum);\n\n const heightHalf = this._getMainAxisLength(isTransformLevel) / 2;\n let upperLeft;\n let lowerLeft;\n if (isTransformLevel) {\n upperLeft =\n this._shape === 'rect'\n ? this._getSecondaryAxisLength(datum[FUNNEL_LAST_VALUE_RATIO]) / 2\n : this._getSecondaryAxisLength(datum[FUNNEL_VALUE_RATIO]) / 2;\n lowerLeft = this._getSecondaryAxisLength(datum[FUNNEL_VALUE_RATIO]) / 2;\n } else {\n upperLeft = this._getSecondaryAxisLength(datum[FUNNEL_VALUE_RATIO]) / 2;\n lowerLeft = this._shape === 'rect' ? upperLeft : this._getSecondaryAxisLength(datum[FUNNEL_NEXT_VALUE_RATIO]) / 2;\n }\n\n const { x, y } = this._getPositionByData(datum);\n\n const points = this._getPolygonPoints([x, y], upperLeft, lowerLeft, upperLeft, lowerLeft, heightHalf);\n\n if (this._funnelAlign !== 'center') {\n this._adjustPoints(points);\n }\n return points;\n }\n\n isTransformLevel(datum: Datum) {\n return !!datum?.[FUNNEL_TRANSFORM_LEVEL];\n }\n\n protected _buildMarkAttributeContext() {\n super._buildMarkAttributeContext();\n // position\n this._markAttributeContext.valueToPosition = this.valueToPosition.bind(this);\n }\n\n valueToPosition(category: StringOrNumber) {\n const innerDatum = this.getViewData()?.latestData?.find?.((d: Datum) => d[this._categoryField] === category);\n if (!isValid(innerDatum)) {\n return null;\n }\n return this._getPolygonCenter(this.getPoints(innerDatum));\n }\n\n dataToPosition(datum: any) {\n return this.valueToPosition(datum[this._categoryField]);\n }\n\n dataToPositionX(datum: any) {\n return this.dataToPosition(datum).x;\n }\n\n dataToPositionY(datum: any) {\n return this.dataToPosition(datum).y;\n }\n\n dataToPositionZ(datum: any) {\n return 0;\n }\n\n private _getMainAxisLength(isTransform = false) {\n const funnelCount = this.getViewDataStatistics().latestData[this.getCategoryField()].values.length;\n const viewHeight = this._isHorizontal() ? this.getLayoutRect().width : this.getLayoutRect().height;\n\n const hasTransform = !!this._spec.isTransform;\n const gap = hasTransform ? 0 : this._spec.gap ?? 0;\n const transformCount = hasTransform ? Math.max(0, funnelCount - 1) : 0;\n const funnelHeight = (viewHeight - gap * Math.max(0, funnelCount - 1)) / (funnelCount + 0.5 * transformCount);\n if (isTransform) {\n return hasTransform ? funnelHeight * 0.5 : 0;\n }\n return funnelHeight;\n }\n\n private _getSecondaryAxisLength(ratio: number) {\n const validRatio = Number.isNaN(ratio) || !Number.isFinite(ratio) ? 0 : ratio;\n const maxSize = this._computeMaxSize();\n const minSize = this._computeMinSize();\n return minSize + (maxSize - minSize) * validRatio;\n }\n\n /**\n * 根据数据计算主轴中心点\n * @param datum\n * @returns\n */\n private _getPositionByData(datum: Datum) {\n const index = this.getViewData().latestData?.findIndex(\n (d: Datum) => d[this._seriesField] === datum[this._seriesField]\n );\n if (!isValid(index) || index < 0) {\n return {};\n }\n const isTransform = this.isTransformLevel(datum);\n const isHorizontal = this._isHorizontal();\n const viewWidth = isHorizontal ? this.getLayoutRect().height : this.getLayoutRect().width;\n const viewHeight = isHorizontal ? this.getLayoutRect().width : this.getLayoutRect().height;\n const centerX = viewWidth / 2;\n\n let centerY = 0;\n const funnelHeight = this._getMainAxisLength();\n const transformHeight = this._getMainAxisLength(true);\n const offset = funnelHeight + transformHeight;\n\n centerY += index * offset;\n centerY += isTransform ? -transformHeight / 2 : funnelHeight / 2;\n if (!this._spec.isTransform && this._spec.gap) {\n centerY += this._spec.gap * index;\n }\n\n this._isReverse() && (centerY = viewHeight - centerY);\n\n return this._isHorizontal() ? { x: centerY, y: centerX } : { x: centerX, y: centerY };\n }\n\n private _getPolygonPoints(\n center: [number, number],\n upperLeft: number,\n lowerLeft: number,\n upperRight: number,\n lowerRight: number,\n heightHalf: number\n ) {\n const x = center[0];\n const y = center[1];\n switch (this._funnelOrient) {\n case 'left':\n return [\n { x: x - heightHalf, y: y + upperLeft },\n { x: x - heightHalf, y: y - upperRight },\n { x: x + heightHalf, y: y - lowerRight },\n { x: x + heightHalf, y: y + lowerLeft }\n ];\n case 'right':\n return [\n { x: x + heightHalf, y: y - upperRight },\n { x: x + heightHalf, y: y + upperRight },\n { x: x - heightHalf, y: y + lowerLeft },\n { x: x - heightHalf, y: y - lowerLeft }\n ];\n case 'bottom':\n return [\n { x: x + upperLeft, y: y + heightHalf },\n { x: x - upperRight, y: y + heightHalf },\n { x: x - lowerRight, y: y - heightHalf },\n { x: x + lowerLeft, y: y - heightHalf }\n ];\n default:\n // top\n return [\n { x: x - upperLeft, y: y - heightHalf },\n { x: x + upperRight, y: y - heightHalf },\n { x: x + lowerRight, y: y + heightHalf },\n { x: x - lowerLeft, y: y + heightHalf }\n ];\n }\n }\n\n /** 计算梯形中位线的中点\n * @param points\n * @returns\n */\n private _getPolygonCenter(points: IPoint[]) {\n if (this._isHorizontal()) {\n const p0_x = (points[0].x + points[3].x) / 2;\n const p0_y = (points[0].y + points[3].y) / 2;\n const p1_x = (points[1].x + points[2].x) / 2;\n const p1_y = (points[1].y + points[2].y) / 2;\n return {\n x: (p0_x + p1_x) / 2,\n y: (p0_y + p1_y) / 2\n };\n }\n\n // 梯形中位线坐标\n const p0_x = (points[0].x + points[3].x) / 2;\n const p0_y = (points[0].y + points[3].y) / 2;\n const p1_x = (points[1].x + points[2].x) / 2;\n const p1_y = (points[1].y + points[2].y) / 2;\n return {\n x: (p0_x + p1_x) / 2,\n y: (p0_y + p1_y) / 2\n };\n }\n\n /**\n * 调整点的偏移量,满足align效果\n * @param points\n * @returns\n */\n private _adjustPoints(points: IPoint[]) {\n let upperOffset;\n let lowerOffset;\n let dirKey;\n if (this._isHorizontal()) {\n dirKey = 'y';\n if (this._funnelOrient === 'left') {\n upperOffset = this._funnelAlign === 'bottom' ? -points[1].y : points[1].y;\n lowerOffset = this._funnelAlign === 'bottom' ? -points[2].y : points[2].y;\n } else {\n upperOffset = this._funnelAlign === 'bottom' ? -points[0].y : points[0].y;\n lowerOffset = this._funnelAlign === 'bottom' ? -points[3].y : points[3].y;\n }\n } else {\n dirKey = 'x';\n if (this._funnelOrient === 'top') {\n upperOffset = this._funnelAlign === 'left' ? points[0].x : -points[0].x;\n lowerOffset = this._funnelAlign === 'left' ? points[3].x : -points[3].x;\n } else {\n upperOffset = this._funnelAlign === 'left' ? points[1].x : -points[1].x;\n lowerOffset = this._funnelAlign === 'left' ? points[2].x : -points[2].x;\n }\n }\n (points[0][dirKey] -= upperOffset), (points[1][dirKey] -= upperOffset);\n (points[2][dirKey] -= lowerOffset), (points[3][dirKey] -= lowerOffset);\n return points;\n }\n\n private _computeLabelPosition(datum: Datum) {\n const points = this.getPoints(datum);\n return this._getPolygonCenter(points);\n }\n\n // label 相关\n private _computeLabelLimit(datum: Datum, labelSpec: IFunnelSeriesSpec['label']) {\n const limit = labelSpec?.limit;\n\n if (isNumber(limit)) {\n return limit;\n }\n\n const points = this.getPoints(datum);\n\n if (limit === 'shapeSize') {\n if (this._isHorizontal()) {\n return Math.abs(points[3].x - points[0].x);\n }\n\n return (Math.abs(points[0].x - points[1].x) + Math.abs(points[2].x - points[3].x)) / 2;\n }\n\n if (this._isHorizontal()) {\n return Math.abs(points[3].x - points[0].x);\n }\n\n // return this._computeMaxSize();\n // FIXME: 待 vrender 修复 maxLineWidth 在 bound 计算的 bug 后可以恢复注释\n return undefined;\n }\n\n private _computeOuterLabelPosition(datum: Datum) {\n let x;\n let y;\n let position: IOrientType = this._spec.outerLabel?.position;\n let textAlign: TextAlign = 'center';\n let textBaseline: TextBaseLine = 'middle';\n if (this._isHorizontal()) {\n position = ['top', 'bottom'].includes(position) ? position : this._funnelAlign === 'bottom' ? 'top' : 'bottom';\n } else {\n position = ['left', 'right'].includes(position) ? position : this._funnelAlign === 'left' ? 'right' : 'left';\n }\n\n if (this._spec.outerLabel?.alignLabel !== false) {\n ({ x, y } = this._getPositionByData(datum));\n if (position === 'left') {\n (x = 0), (textAlign = 'left');\n } else if (position === 'right') {\n (x = this.getLayoutRect().width), (textAlign = 'right');\n } else if (position === 'top') {\n (y = 0), (textBaseline = 'top');\n } else if (position === 'bottom') {\n (y = this.getLayoutRect().height), (textBaseline = 'bottom');\n }\n } else {\n const { x2, y2 } = this._computeOuterLabelLinePosition(datum);\n (x = x2), (y = y2);\n if (position === 'left') {\n (x -= FUNNEL_LABEL_SPACE_WIDTH), (textAlign = 'right');\n } else if (position === 'right') {\n (x += FUNNEL_LABEL_SPACE_WIDTH), (textAlign = 'left');\n } else if (position === 'top') {\n (y -= FUNNEL_LABEL_SPACE_WIDTH), (textBaseline = 'bottom');\n } else if (position === 'bottom') {\n (y += FUNNEL_LABEL_SPACE_WIDTH), (textBaseline = 'top');\n }\n }\n return { x, y, align: textAlign, textBaseline };\n }\n\n private _computeOuterLabelLimit(datum: Datum) {\n if (this._isHorizontal()) {\n return this._getMainAxisLength(this.isTransformLevel(datum));\n }\n\n // 垂直方向上的limit计算逻辑\n const points = this.getPoints(datum);\n const shapeMiddleWidth = (Math.abs(points[0].x - points[1].x) + Math.abs(points[2].x - points[3].x)) / 2;\n const categoryField = this.getCategoryField();\n\n const funnelLabelBounds = this._labelMark\n ?.getComponent()\n ?.getProduct()\n .getGroupGraphicItem()\n .find(({ attribute, type }: { attribute: LabelItem; type: string }) => {\n return type === 'text' && attribute.data?.[categoryField] === datum[categoryField];\n }, true)?.AABBBounds;\n\n const funnelLabelWidth = funnelLabelBounds ? funnelLabelBounds.x2 - funnelLabelBounds.x1 : 0;\n return (\n this.getLayoutRect().width / 2 -\n Math.max(shapeMiddleWidth / 2, funnelLabelWidth / 2) -\n FUNNEL_LABEL_LINE_LENGTH -\n (this._spec.outerLabel?.spaceWidth ?? FUNNEL_LABEL_SPACE_WIDTH) * 2\n );\n }\n\n private _computeOuterLabelLinePosition(datum: Datum) {\n const categoryField = this.getCategoryField();\n const outerLabelMarkBounds = this._funnelOuterLabelMark?.label\n ?.getProduct()\n ?.elements?.find((el: any) => el.data[0]?.[categoryField] === datum[categoryField])\n ?.getBounds();\n\n const labelMarkBounds = this._labelMark\n ?.getComponent()\n ?.getProduct()\n .getGroupGraphicItem()\n .find(({ attribute, type }: { attribute: LabelItem; type: string }) => {\n return type === 'text' && attribute.data?.[categoryField] === datum[categoryField];\n }, true)?.AABBBounds;\n const outerLabelSpec = this._spec.outerLabel ?? {};\n let x1;\n let x2;\n let y1;\n let y2;\n if (this._isHorizontal()) {\n const spaceWidth = outerLabelSpec.spaceWidth ?? FUNNEL_LABEL_SPACE_WIDTH;\n const points = this.getPoints(datum);\n const shapeMiddleHeight = (Math.abs(points[0].y - points[1].y) + Math.abs(points[2].y - points[3].y)) / 2;\n if (this._spec.outerLabel.position === 'top' || this._funnelAlign === 'bottom') {\n y1 = this._getPolygonCenter(points).y - shapeMiddleHeight / 2 - spaceWidth;\n y2 = outerLabelSpec.alignLabel !== false ? outerLabelMarkBounds?.y2 + spaceWidth : y1 - spaceWidth;\n x1 = this._getPolygonCenter(points).x;\n y1 - y2 < FUNNEL_LABEL_LINE_LENGTH && (y2 = y1 - FUNNEL_LABEL_LINE_LENGTH);\n x2 = x1;\n } else {\n y1 = this._getPolygonCenter(points).y + shapeMiddleHeight / 2 + spaceWidth;\n y2 = outerLabelSpec.alignLabel !== false ? outerLabelMarkBounds?.y1 - spaceWidth : y1 + spaceWidth;\n x1 = this._getPolygonCenter(points).x;\n y2 - y1 < FUNNEL_LABEL_LINE_LENGTH && (y2 = y1 + FUNNEL_LABEL_LINE_LENGTH);\n x2 = x1;\n }\n return { x1, x2, y1, y2 };\n }\n const points = this.getPoints(datum);\n const shapeMiddleWidth = (Math.abs(points[0].x - points[1].x) + Math.abs(points[2].x - points[3].x)) / 2;\n const labelWidth = labelMarkBounds?.x2 - labelMarkBounds?.x1 || 0;\n\n const spaceWidth = outerLabelSpec.spaceWidth ?? FUNNEL_LABEL_SPACE_WIDTH;\n if (this._spec.outerLabel.position === 'right' || this._funnelAlign === 'left') {\n x1 = this._getPolygonCenter(points).x + Math.max(labelWidth / 2, shapeMiddleWidth / 2) + spaceWidth;\n x2 = outerLabelSpec.alignLabel !== false ? outerLabelMarkBounds?.x1 - spaceWidth : x1 + spaceWidth;\n y1 = this._getPolygonCenter(points).y;\n x2 - x1 < FUNNEL_LABEL_LINE_LENGTH && (x2 = x1 + FUNNEL_LABEL_LINE_LENGTH);\n y2 = y1;\n } else {\n x1 = this._getPolygonCenter(points).x - Math.max(labelWidth / 2, shapeMiddleWidth / 2) - spaceWidth;\n x2 = outerLabelSpec.alignLabel !== false ? outerLabelMarkBounds?.x2 + spaceWidth : x1 - spaceWidth;\n y1 = this._getPolygonCenter(points).y;\n x1 - x2 < FUNNEL_LABEL_LINE_LENGTH && (x2 = x1 - FUNNEL_LABEL_LINE_LENGTH);\n y2 = y1;\n }\n return { x1, x2, y1, y2 };\n }\n\n protected _computeMaxSize() {\n const size = this._isHorizontal() ? this.getLayoutRect().height : this.getLayoutRect().width;\n const maxSize = this._spec.maxSize ?? FUNNEL_MAX_SIZE;\n return calcLayoutNumber(maxSize, size);\n }\n\n protected _computeMinSize() {\n const size = this._isHorizontal() ? this.getLayoutRect().height : this.getLayoutRect().width;\n const minSize = this._spec.minSize ?? FUNNEL_MIN_SIZE;\n return calcLayoutNumber(minSize, size);\n }\n\n protected _isHorizontal() {\n return this._funnelOrient === 'left' || this._funnelOrient === 'right';\n }\n\n private _isReverse() {\n return this._funnelOrient === 'bottom' || this._funnelOrient === 'right';\n }\n\n getDefaultShapeType(): string {\n return 'square';\n }\n\n getActiveMarks(): IMark[] {\n return [this._funnelMark];\n }\n}\n\nexport const registerFunnelSeries = () => {\n registerPolygonMark();\n registerTextMark();\n registerRuleMark();\n Factory.registerSeries(FunnelSeries.type, FunnelSeries);\n Factory.registerAnimation('funnel', (params: any, preset: FunnelAppearPreset) => ({\n appear: preset === 'clipIn' ? undefined : { type: 'fadeIn' },\n ...FadeInOutAnimation\n }));\n registerCartesianGroupClipAnimation();\n registerFadeInOutAnimation();\n};\n"]}
1
+ {"version":3,"sources":["../src/series/funnel/funnel.ts"],"names":[],"mappings":";;;AAEA,4CAAuD;AAEvD,4CAAmD;AAEnD,qDAAiD;AACjD,6CAAwD;AACxD,kDAAuE;AACvE,iDAA8C;AAE9C,oDAAyD;AAEzD,yDAAuE;AACvE,kDAe+B;AAE/B,4CAAoD;AACpD,8CAA0C;AAG1C,qDAA6D;AAC7D,6CAAwE;AACxE,mDAIgC;AAChC,iDAAgG;AAChG,qDAAiD;AAEjD,wDAA8E;AAC9E,0CAA6D;AAC7D,0CAA6D;AAC7D,yCAA8C;AAG9C,gDAA6C;AAC7C,6DAAmE;AAEnE,MAAa,YACX,SAAQ,wBAAa;IADvB;;QAKE,SAAI,GAAG,qBAAc,CAAC,MAAM,CAAC;QACnB,oBAAe,GAAuB,yBAAkB,CAAC,MAAM,CAAC;QAChE,oBAAe,GAAiB,mBAAY,CAAC,OAAO,CAAC;QACrD,uBAAkB,GAAuB,yBAAkB,CAAC,SAAS,CAAC;QACtE,uBAAkB,GAAiB,mBAAY,CAAC,OAAO,CAAC;QAIzD,2BAAsB,GAAG,gDAA2B,CAAC;QA0BpD,gBAAW,GAAwB,IAAI,CAAC;QACxC,yBAAoB,G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AA0B,GAAE,CAAC;AAC/B,CAAC,CAAC;AAXW,QAAA,oBAAoB,wBAW/B","file":"funnel.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport type { IFunnelSeries, SeriesMarkMap } from '../interface';\nimport { SeriesMarkNameEnum } from '../interface/type';\nimport type { IOrientType, IPoint, TextAlign, TextBaseLine, Maybe, Datum, StringOrNumber } from '../../typings';\nimport { SeriesTypeEnum } from '../interface/type';\nimport type { IPolygonMark } from '../../mark/polygon/polygon';\nimport { BaseSeries } from '../base/base-series';\nimport { AttributeLevel, PREFIX } from '../../constant';\nimport { registerDataSetInstanceTransform } from '../../data/register';\nimport { DataView } from '@visactor/vdataset';\nimport type { IMark } from '../../mark/interface';\nimport { MarkTypeEnum } from '../../mark/interface/type';\nimport type { IFunnelOpt } from '../../data/transforms/funnel';\nimport { funnel, funnelTransform } from '../../data/transforms/funnel';\nimport {\n FUNNEL_CURRENT_VALUE,\n FUNNEL_HEIGHT_RATIO,\n FUNNEL_LABEL_LINE_LENGTH,\n FUNNEL_LABEL_SPACE_WIDTH,\n FUNNEL_LAST_VALUE,\n FUNNEL_LAST_VALUE_RATIO,\n FUNNEL_MAX_SIZE,\n FUNNEL_MIN_SIZE,\n FUNNEL_NEXT_VALUE,\n FUNNEL_NEXT_VALUE_RATIO,\n FUNNEL_REACH_RATIO,\n FUNNEL_TRANSFORM_LEVEL,\n FUNNEL_TRANSFORM_RATIO,\n FUNNEL_VALUE_RATIO\n} from '../../constant/funnel';\nimport type { ITextMark } from '../../mark/text';\nimport { calcLayoutNumber } from '../../util/space';\nimport { field } from '../../util/object';\nimport type { FunnelAppearPreset, IFunnelSeriesSpec, IFunnelSeriesTheme } from './interface';\nimport type { IRuleMark } from '../../mark/rule';\nimport { FunnelSeriesTooltipHelper } from './tooltip-helper';\nimport { isFunction, isValid, merge, isNumber } from '@visactor/vutils';\nimport {\n FadeInOutAnimation,\n registerCartesianGroupClipAnimation,\n registerFadeInOutAnimation\n} from '../../animation/config';\nimport { animationConfig, shouldMarkDoMorph, userAnimationConfig } from '../../animation/utils';\nimport { SeriesData } from '../base/series-data';\nimport type { IStateAnimateSpec } from '../../animation/spec';\nimport { PolygonMark, registerPolygonMark } from '../../mark/polygon/polygon';\nimport { TextMark, registerTextMark } from '../../mark/text';\nimport { RuleMark, registerRuleMark } from '../../mark/rule';\nimport { funnelSeriesMark } from './constant';\nimport type { ILabelMark } from '../../mark/label';\nimport type { LabelItem } from '@visactor/vrender-components';\nimport { Factory } from '../../core/factory';\nimport { FunnelSeriesSpecTransformer } from './funnel-transformer';\n\nexport class FunnelSeries<T extends IFunnelSeriesSpec = IFunnelSeriesSpec>\n extends BaseSeries<T>\n implements IFunnelSeries\n{\n static readonly type: string = SeriesTypeEnum.funnel;\n type = SeriesTypeEnum.funnel;\n protected _funnelMarkName: SeriesMarkNameEnum = SeriesMarkNameEnum.funnel;\n protected _funnelMarkType: MarkTypeEnum = MarkTypeEnum.polygon;\n protected _transformMarkName: SeriesMarkNameEnum = SeriesMarkNameEnum.transform;\n protected _transformMarkType: MarkTypeEnum = MarkTypeEnum.polygon;\n\n static readonly mark: SeriesMarkMap = funnelSeriesMark;\n static readonly transformerConstructor = FunnelSeriesSpecTransformer as any;\n readonly transformerConstructor = FunnelSeriesSpecTransformer;\n\n protected _categoryField!: string;\n getCategoryField() {\n return this._categoryField;\n }\n setCategoryField(f: string): string {\n this._categoryField = f;\n return this._categoryField;\n }\n\n protected _valueField!: string;\n getValueField() {\n return this._valueField;\n }\n setValueField(f: string): string {\n this._valueField = f;\n return this._valueField;\n }\n\n protected _viewDataTransform!: SeriesData;\n\n protected _funnelAlign: 'left' | 'center' | 'right' | 'top' | 'bottom';\n protected _funnelOrient: IOrientType;\n protected _shape: 'rect' | 'trapezoid';\n\n protected _funnelMark: IPolygonMark | null = null;\n protected _funnelTransformMark: IPolygonMark | null = null;\n protected _labelMark: ILabelMark | null = null;\n protected _transformLabelMark: ILabelMark | null = null;\n protected _funnelOuterLabelMark: { label?: ITextMark; line?: IRuleMark } = {};\n\n setAttrFromSpec(): void {\n super.setAttrFromSpec();\n\n this.setCategoryField(this._spec.categoryField);\n this.setValueField(this._spec.valueField);\n\n this._funnelOrient = this._spec.funnelOrient ?? 'top';\n this._shape = this._spec.shape ?? 'trapezoid';\n\n if (this._isHorizontal()) {\n this._funnelAlign = ['top', 'bottom'].includes(this._spec.funnelAlign) ? this._spec.funnelAlign : 'center';\n } else {\n this._funnelAlign = ['left', 'right'].includes(this._spec.funnelAlign) ? this._spec.funnelAlign : 'center';\n }\n\n if (this._spec.categoryField) {\n this.setSeriesField(this._spec.categoryField);\n }\n }\n\n initData() {\n super.initData();\n if (!this._data) {\n return;\n }\n\n registerDataSetInstanceTransform(this._dataSet, 'funnel', funnel);\n registerDataSetInstanceTransform(this._dataSet, 'funnelTransform', funnelTransform);\n\n const viewDataTransform = new DataView(this._dataSet, { name: `${PREFIX}_series_${this.id}_viewDataTransform` });\n viewDataTransform.parse([this.getViewData()], {\n type: 'dataview'\n });\n\n this._viewDataTransform = new SeriesData(this._option, viewDataTransform);\n }\n\n getStatisticFields() {\n const fields: { key: string; operations: Array<'max' | 'min' | 'values'> }[] = [];\n fields.push({ key: this._categoryField, operations: ['values'] });\n fields.push({ key: this._valueField, operations: ['max', 'min'] });\n return fields;\n }\n\n protected _statisticViewData(): void {\n super._statisticViewData();\n this._data.getDataView().transform({\n type: 'funnel',\n options: {\n valueField: this.getValueField(),\n isCone: this._spec.isCone,\n // heightVisual: true,\n asCurrentValue: FUNNEL_CURRENT_VALUE,\n asTransformRatio: FUNNEL_TRANSFORM_RATIO,\n asReachRatio: FUNNEL_REACH_RATIO,\n asHeightRatio: FUNNEL_HEIGHT_RATIO,\n asValueRatio: FUNNEL_VALUE_RATIO,\n asNextValueRatio: FUNNEL_NEXT_VALUE_RATIO,\n asLastValueRatio: FUNNEL_LAST_VALUE_RATIO,\n asLastValue: FUNNEL_LAST_VALUE,\n asNextValue: FUNNEL_NEXT_VALUE,\n range: {\n min: this._spec.range?.min ?? this.getViewDataStatistics().latestData?.[this.getValueField()]?.min,\n max: this._spec.range?.max ?? this.getViewDataStatistics().latestData?.[this.getValueField()]?.max\n }\n } as IFunnelOpt\n });\n\n this._viewDataTransform.getDataView()?.transform({\n type: 'funnelTransform',\n options: { asIsTransformLevel: FUNNEL_TRANSFORM_LEVEL }\n });\n }\n\n initMark() {\n this._funnelMark = this._createMark(\n {\n ...FunnelSeries.mark.funnel,\n name: this._funnelMarkName,\n type: this._funnelMarkType\n },\n {\n themeSpec: this._theme?.funnel,\n morph: shouldMarkDoMorph(this._spec, this._funnelMarkName),\n defaultMorphElementKey: this._seriesField,\n key: this._seriesField,\n groupKey: this._seriesField,\n isSeriesMark: true,\n customShape: this._spec.funnel?.customShape\n }\n ) as IPolygonMark;\n\n if (this._spec.isTransform) {\n this._funnelTransformMark = this._createMark(\n {\n ...FunnelSeries.mark.transform,\n name: this._transformMarkName,\n type: this._transformMarkType\n },\n {\n themeSpec: this._theme?.transform,\n key: this._seriesField,\n skipBeforeLayouted: false,\n dataView: this._viewDataTransform.getDataView(),\n dataProductId: this._viewDataTransform.getProductId(),\n customShape: this._spec.transform?.customShape\n }\n );\n }\n\n if (this._spec?.outerLabel?.visible) {\n const { line } = this._spec.outerLabel ?? {};\n const { line: lineTheme } = this._theme?.outerLabel ?? {};\n\n this._funnelOuterLabelMark.label = this._createMark(FunnelSeries.mark.outerLabel, {\n themeSpec: this._theme?.outerLabel,\n key: this._seriesField,\n markSpec: this._spec.outerLabel,\n skipBeforeLayouted: true\n }) as ITextMark;\n\n this._funnelOuterLabelMark.line = this._createMark(FunnelSeries.mark.outerLabelLine, {\n themeSpec: lineTheme,\n key: this._seriesField,\n markSpec: line,\n depend: [this._funnelOuterLabelMark.label]\n }) as IRuleMark;\n }\n }\n\n protected initTooltip() {\n this._tooltipHelper = new FunnelSeriesTooltipHelper(this);\n this._funnelMark && this._tooltipHelper.activeTriggerSet.mark.add(this._funnelMark);\n this._funnelTransformMark && this._tooltipHelper.activeTriggerSet.mark.add(this._funnelTransformMark);\n }\n\n getDimensionField(): string[] {\n return this._seriesField ? [this._seriesField] : [];\n }\n getMeasureField(): string[] {\n return [this._valueField];\n }\n\n getGroupFields(): string[] {\n return null;\n }\n\n initMarkStyle() {\n const funnelMark = this._funnelMark;\n if (funnelMark) {\n this.setMarkStyle(\n funnelMark,\n {\n points: (datum: Datum) => this.getPoints(datum),\n visible: (datum: Datum) => isValid(datum[this._valueField]),\n fill: this.getColorAttribute()\n },\n 'normal',\n AttributeLevel.Series\n );\n this._trigger.registerMark(funnelMark);\n }\n\n const funnelTransformMark = this._funnelTransformMark;\n if (funnelTransformMark) {\n this.setMarkStyle(\n funnelTransformMark,\n { points: (datum: Datum) => this.getPoints(datum) },\n 'normal',\n AttributeLevel.Series\n );\n this._trigger.registerMark(funnelTransformMark);\n }\n\n const outerLabelMark = this._funnelOuterLabelMark.label;\n if (outerLabelMark) {\n this.setMarkStyle(\n outerLabelMark,\n {\n text: (datum: Datum) => {\n const text = `${datum[this.getCategoryField()]}`;\n if (isFunction(this._spec.outerLabel.formatMethod)) {\n return this._spec.outerLabel.formatMethod(text, datum);\n }\n return text;\n },\n x: (datum: Datum) => this._computeOuterLabelPosition(datum).x,\n y: (datum: Datum) => this._computeOuterLabelPosition(datum).y,\n textAlign: (datum: Datum) => this._computeOuterLabelPosition(datum).align,\n textBaseline: (datum: Datum) => this._computeOuterLabelPosition(datum).textBaseline,\n limit: (datum: Datum) => this._computeOuterLabelLimit(datum)\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n const outerLabelLineMark = this._funnelOuterLabelMark.line;\n if (outerLabelLineMark && outerLabelMark) {\n this.setMarkStyle(\n outerLabelLineMark,\n {\n x: (datum: Datum) => this._computeOuterLabelLinePosition(datum).x1,\n y: (datum: Datum) => this._computeOuterLabelLinePosition(datum).y1,\n x1: (datum: Datum) => this._computeOuterLabelLinePosition(datum).x2,\n y1: (datum: Datum) => this._computeOuterLabelLinePosition(datum).y2\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n }\n\n initLabelMarkStyle(labelMark?: ILabelMark) {\n if (!labelMark) {\n return;\n }\n\n const target = labelMark.getTarget();\n const component = labelMark.getComponent();\n\n if (target === this._funnelMark) {\n this._labelMark = labelMark;\n this.setMarkStyle(\n labelMark,\n {\n text: (datum: Datum) => `${datum[this.getCategoryField()]} ${datum[this.getValueField()]}`,\n x: (datum: Datum) => this._computeLabelPosition(datum).x,\n y: (datum: Datum) => this._computeLabelPosition(datum).y,\n maxLineWidth: (datum: Datum) => this._computeLabelLimit(datum, this._spec.label),\n stroke: this.getColorAttribute()\n },\n 'normal',\n AttributeLevel.Series\n );\n if (this._funnelOuterLabelMark?.label) {\n this._funnelOuterLabelMark.label.setDepend(component);\n }\n\n if (this._funnelOuterLabelMark?.line) {\n this._funnelOuterLabelMark.line.setDepend(...this._funnelOuterLabelMark.line.getDepend());\n }\n } else if (this._funnelTransformMark && target === this._funnelTransformMark) {\n this._transformLabelMark = labelMark;\n this.setMarkStyle(\n labelMark,\n {\n text: (datum: Datum) => {\n const ratio = field(FUNNEL_REACH_RATIO).bind(this)(datum) as number;\n return `${(ratio * 100).toFixed(1)}%`;\n },\n x: (datum: Datum) => this._computeLabelPosition(datum).x,\n y: (datum: Datum) => this._computeLabelPosition(datum).y,\n maxLineWidth: (datum: Datum) => this._computeLabelLimit(datum, this._spec.transformLabel)\n },\n 'normal',\n AttributeLevel.Series\n );\n }\n }\n\n initAnimation() {\n const appearPreset = (this._spec?.animationAppear as IStateAnimateSpec<FunnelAppearPreset>)?.preset ?? 'clipIn';\n if (appearPreset === 'clipIn') {\n if (this._rootMark) {\n this._rootMark.setAnimationConfig(\n animationConfig(\n Factory.getAnimationInKey('cartesianGroupClip')?.(\n {\n direction: () => (this._isHorizontal() ? 'x' : 'y'),\n width: () => this.getLayoutRect().width,\n height: () => this.getLayoutRect().height,\n orient: () => (this._isReverse() ? 'negative' : 'positive')\n },\n appearPreset\n ),\n userAnimationConfig(SeriesMarkNameEnum.group, this._spec, this._markAttributeContext)\n )\n );\n }\n }\n [this._funnelOuterLabelMark?.label].forEach(m => {\n if (m) {\n m.setAnimationConfig(\n animationConfig(\n Factory.getAnimationInKey('fadeInOut')(),\n userAnimationConfig(m.name, this._spec, this._markAttributeContext)\n )\n );\n }\n });\n\n [this._funnelMark, this._funnelTransformMark].forEach(m => {\n if (m) {\n m.setAnimationConfig(\n animationConfig(\n Factory.getAnimationInKey('funnel')({}, appearPreset),\n userAnimationConfig(m.name, this._spec, this._markAttributeContext)\n )\n );\n }\n });\n\n if (this._funnelOuterLabelMark?.line) {\n this._funnelOuterLabelMark.line.setAnimationConfig(\n animationConfig(\n Factory.getAnimationInKey('fadeInOut')?.(),\n userAnimationConfig(SeriesMarkNameEnum.outerLabelLine, this._spec, this._markAttributeContext)\n )\n );\n }\n }\n // hack group\n initGroups() {\n // do nothing\n }\n\n // handle stack\n getStackGroupFields(): string[] {\n return [];\n }\n\n getStackValueField(): string {\n // hack\n return null;\n }\n\n /** event */\n protected initEvent() {\n super.initEvent();\n // 同步更新转化层数据\n this._viewDataTransform.getDataView()?.target.addListener('change', (d: DataView) => {\n this._viewDataTransform.updateData();\n });\n }\n\n /**\n *\n * P0 ----------- P1 P2 ------ P3\n * \\ / / \\\n * P3 ------ P2 P1 ---------- P0\n *\n * P1 P0\n * |\\ P2 P3 /|\n * | | | |\n * |/ P3 P2 \\|\n * P0 P1\n */\n getPoints(datum: Datum) {\n // 对特殊数据层不进行绘制\n const isTransformLevel = this.isTransformLevel(datum);\n\n const heightHalf = this._getMainAxisLength(isTransformLevel) / 2;\n let upperLeft;\n let lowerLeft;\n if (isTransformLevel) {\n upperLeft =\n this._shape === 'rect'\n ? this._getSecondaryAxisLength(datum[FUNNEL_LAST_VALUE_RATIO]) / 2\n : this._getSecondaryAxisLength(datum[FUNNEL_VALUE_RATIO]) / 2;\n lowerLeft = this._getSecondaryAxisLength(datum[FUNNEL_VALUE_RATIO]) / 2;\n } else {\n upperLeft = this._getSecondaryAxisLength(datum[FUNNEL_VALUE_RATIO]) / 2;\n lowerLeft = this._shape === 'rect' ? upperLeft : this._getSecondaryAxisLength(datum[FUNNEL_NEXT_VALUE_RATIO]) / 2;\n }\n\n const { x, y } = this._getPositionByData(datum);\n\n const points = this._getPolygonPoints([x, y], upperLeft, lowerLeft, upperLeft, lowerLeft, heightHalf);\n\n if (this._funnelAlign !== 'center') {\n this._adjustPoints(points);\n }\n return points;\n }\n\n isTransformLevel(datum: Datum) {\n return !!datum?.[FUNNEL_TRANSFORM_LEVEL];\n }\n\n protected _buildMarkAttributeContext() {\n super._buildMarkAttributeContext();\n // position\n this._markAttributeContext.valueToPosition = this.valueToPosition.bind(this);\n this._markAttributeContext.getPoints = this.getPoints.bind(this);\n this._markAttributeContext.isTransformLevel = this.isTransformLevel.bind(this);\n }\n\n valueToPosition(category: StringOrNumber) {\n const innerDatum = this.getViewData()?.latestData?.find?.((d: Datum) => d[this._categoryField] === category);\n if (!isValid(innerDatum)) {\n return null;\n }\n return this._getPolygonCenter(this.getPoints(innerDatum));\n }\n\n dataToPosition(datum: any) {\n return this.valueToPosition(datum[this._categoryField]);\n }\n\n dataToPositionX(datum: any) {\n return this.dataToPosition(datum).x;\n }\n\n dataToPositionY(datum: any) {\n return this.dataToPosition(datum).y;\n }\n\n dataToPositionZ(datum: any) {\n return 0;\n }\n\n private _getMainAxisLength(isTransform = false) {\n const funnelCount = this.getViewDataStatistics().latestData[this.getCategoryField()].values.length;\n const viewHeight = this._isHorizontal() ? this.getLayoutRect().width : this.getLayoutRect().height;\n\n const hasTransform = !!this._spec.isTransform;\n const gap = hasTransform ? 0 : this._spec.gap ?? 0;\n const transformCount = hasTransform ? Math.max(0, funnelCount - 1) : 0;\n const funnelHeight = (viewHeight - gap * Math.max(0, funnelCount - 1)) / (funnelCount + 0.5 * transformCount);\n if (isTransform) {\n return hasTransform ? funnelHeight * 0.5 : 0;\n }\n return funnelHeight;\n }\n\n private _getSecondaryAxisLength(ratio: number) {\n const validRatio = Number.isNaN(ratio) || !Number.isFinite(ratio) ? 0 : ratio;\n const maxSize = this._computeMaxSize();\n const minSize = this._computeMinSize();\n return minSize + (maxSize - minSize) * validRatio;\n }\n\n /**\n * 根据数据计算主轴中心点\n * @param datum\n * @returns\n */\n private _getPositionByData(datum: Datum) {\n const index = this.getViewData().latestData?.findIndex(\n (d: Datum) => d[this._seriesField] === datum[this._seriesField]\n );\n if (!isValid(index) || index < 0) {\n return {};\n }\n const isTransform = this.isTransformLevel(datum);\n const isHorizontal = this._isHorizontal();\n const viewWidth = isHorizontal ? this.getLayoutRect().height : this.getLayoutRect().width;\n const viewHeight = isHorizontal ? this.getLayoutRect().width : this.getLayoutRect().height;\n const centerX = viewWidth / 2;\n\n let centerY = 0;\n const funnelHeight = this._getMainAxisLength();\n const transformHeight = this._getMainAxisLength(true);\n const offset = funnelHeight + transformHeight;\n\n centerY += index * offset;\n centerY += isTransform ? -transformHeight / 2 : funnelHeight / 2;\n if (!this._spec.isTransform && this._spec.gap) {\n centerY += this._spec.gap * index;\n }\n\n this._isReverse() && (centerY = viewHeight - centerY);\n\n return this._isHorizontal() ? { x: centerY, y: centerX } : { x: centerX, y: centerY };\n }\n\n private _getPolygonPoints(\n center: [number, number],\n upperLeft: number,\n lowerLeft: number,\n upperRight: number,\n lowerRight: number,\n heightHalf: number\n ) {\n const x = center[0];\n const y = center[1];\n switch (this._funnelOrient) {\n case 'left':\n return [\n { x: x - heightHalf, y: y + upperLeft },\n { x: x - heightHalf, y: y - upperRight },\n { x: x + heightHalf, y: y - lowerRight },\n { x: x + heightHalf, y: y + lowerLeft }\n ];\n case 'right':\n return [\n { x: x + heightHalf, y: y - upperRight },\n { x: x + heightHalf, y: y + upperRight },\n { x: x - heightHalf, y: y + lowerLeft },\n { x: x - heightHalf, y: y - lowerLeft }\n ];\n case 'bottom':\n return [\n { x: x + upperLeft, y: y + heightHalf },\n { x: x - upperRight, y: y + heightHalf },\n { x: x - lowerRight, y: y - heightHalf },\n { x: x + lowerLeft, y: y - heightHalf }\n ];\n default:\n // top\n return [\n { x: x - upperLeft, y: y - heightHalf },\n { x: x + upperRight, y: y - heightHalf },\n { x: x + lowerRight, y: y + heightHalf },\n { x: x - lowerLeft, y: y + heightHalf }\n ];\n }\n }\n\n /** 计算梯形中位线的中点\n * @param points\n * @returns\n */\n private _getPolygonCenter(points: IPoint[]) {\n if (this._isHorizontal()) {\n const p0_x = (points[0].x + points[3].x) / 2;\n const p0_y = (points[0].y + points[3].y) / 2;\n const p1_x = (points[1].x + points[2].x) / 2;\n const p1_y = (points[1].y + points[2].y) / 2;\n return {\n x: (p0_x + p1_x) / 2,\n y: (p0_y + p1_y) / 2\n };\n }\n\n // 梯形中位线坐标\n const p0_x = (points[0].x + points[3].x) / 2;\n const p0_y = (points[0].y + points[3].y) / 2;\n const p1_x = (points[1].x + points[2].x) / 2;\n const p1_y = (points[1].y + points[2].y) / 2;\n return {\n x: (p0_x + p1_x) / 2,\n y: (p0_y + p1_y) / 2\n };\n }\n\n /**\n * 调整点的偏移量,满足align效果\n * @param points\n * @returns\n */\n private _adjustPoints(points: IPoint[]) {\n let upperOffset;\n let lowerOffset;\n let dirKey;\n if (this._isHorizontal()) {\n dirKey = 'y';\n if (this._funnelOrient === 'left') {\n upperOffset = this._funnelAlign === 'bottom' ? -points[1].y : points[1].y;\n lowerOffset = this._funnelAlign === 'bottom' ? -points[2].y : points[2].y;\n } else {\n upperOffset = this._funnelAlign === 'bottom' ? -points[0].y : points[0].y;\n lowerOffset = this._funnelAlign === 'bottom' ? -points[3].y : points[3].y;\n }\n } else {\n dirKey = 'x';\n if (this._funnelOrient === 'top') {\n upperOffset = this._funnelAlign === 'left' ? points[0].x : -points[0].x;\n lowerOffset = this._funnelAlign === 'left' ? points[3].x : -points[3].x;\n } else {\n upperOffset = this._funnelAlign === 'left' ? points[1].x : -points[1].x;\n lowerOffset = this._funnelAlign === 'left' ? points[2].x : -points[2].x;\n }\n }\n (points[0][dirKey] -= upperOffset), (points[1][dirKey] -= upperOffset);\n (points[2][dirKey] -= lowerOffset), (points[3][dirKey] -= lowerOffset);\n return points;\n }\n\n private _computeLabelPosition(datum: Datum) {\n const points = this.getPoints(datum);\n return this._getPolygonCenter(points);\n }\n\n // label 相关\n private _computeLabelLimit(datum: Datum, labelSpec: IFunnelSeriesSpec['label']) {\n const limit = labelSpec?.limit;\n\n if (isNumber(limit)) {\n return limit;\n }\n\n const points = this.getPoints(datum);\n\n if (limit === 'shapeSize') {\n if (this._isHorizontal()) {\n return Math.abs(points[3].x - points[0].x);\n }\n\n return (Math.abs(points[0].x - points[1].x) + Math.abs(points[2].x - points[3].x)) / 2;\n }\n\n if (this._isHorizontal()) {\n return Math.abs(points[3].x - points[0].x);\n }\n\n // return this._computeMaxSize();\n // FIXME: 待 vrender 修复 maxLineWidth 在 bound 计算的 bug 后可以恢复注释\n return undefined;\n }\n\n private _computeOuterLabelPosition(datum: Datum) {\n let x;\n let y;\n let position: IOrientType = this._spec.outerLabel?.position;\n let textAlign: TextAlign = 'center';\n let textBaseline: TextBaseLine = 'middle';\n if (this._isHorizontal()) {\n position = ['top', 'bottom'].includes(position) ? position : this._funnelAlign === 'bottom' ? 'top' : 'bottom';\n } else {\n position = ['left', 'right'].includes(position) ? position : this._funnelAlign === 'left' ? 'right' : 'left';\n }\n\n if (this._spec.outerLabel?.alignLabel !== false) {\n ({ x, y } = this._getPositionByData(datum));\n if (position === 'left') {\n (x = 0), (textAlign = 'left');\n } else if (position === 'right') {\n (x = this.getLayoutRect().width), (textAlign = 'right');\n } else if (position === 'top') {\n (y = 0), (textBaseline = 'top');\n } else if (position === 'bottom') {\n (y = this.getLayoutRect().height), (textBaseline = 'bottom');\n }\n } else {\n const { x2, y2 } = this._computeOuterLabelLinePosition(datum);\n (x = x2), (y = y2);\n if (position === 'left') {\n (x -= FUNNEL_LABEL_SPACE_WIDTH), (textAlign = 'right');\n } else if (position === 'right') {\n (x += FUNNEL_LABEL_SPACE_WIDTH), (textAlign = 'left');\n } else if (position === 'top') {\n (y -= FUNNEL_LABEL_SPACE_WIDTH), (textBaseline = 'bottom');\n } else if (position === 'bottom') {\n (y += FUNNEL_LABEL_SPACE_WIDTH), (textBaseline = 'top');\n }\n }\n return { x, y, align: textAlign, textBaseline };\n }\n\n private _computeOuterLabelLimit(datum: Datum) {\n if (this._isHorizontal()) {\n return this._getMainAxisLength(this.isTransformLevel(datum));\n }\n\n // 垂直方向上的limit计算逻辑\n const points = this.getPoints(datum);\n const shapeMiddleWidth = (Math.abs(points[0].x - points[1].x) + Math.abs(points[2].x - points[3].x)) / 2;\n const categoryField = this.getCategoryField();\n\n const funnelLabelBounds = this._labelMark\n ?.getComponent()\n ?.getProduct()\n .getGroupGraphicItem()\n .find(({ attribute, type }: { attribute: LabelItem; type: string }) => {\n return type === 'text' && attribute.data?.[categoryField] === datum[categoryField];\n }, true)?.AABBBounds;\n\n const funnelLabelWidth = funnelLabelBounds ? funnelLabelBounds.x2 - funnelLabelBounds.x1 : 0;\n return (\n this.getLayoutRect().width / 2 -\n Math.max(shapeMiddleWidth / 2, funnelLabelWidth / 2) -\n FUNNEL_LABEL_LINE_LENGTH -\n (this._spec.outerLabel?.spaceWidth ?? FUNNEL_LABEL_SPACE_WIDTH) * 2\n );\n }\n\n private _computeOuterLabelLinePosition(datum: Datum) {\n const categoryField = this.getCategoryField();\n const outerLabelMarkBounds = this._funnelOuterLabelMark?.label\n ?.getProduct()\n ?.elements?.find((el: any) => el.data[0]?.[categoryField] === datum[categoryField])\n ?.getBounds();\n\n const labelMarkBounds = this._labelMark\n ?.getComponent()\n ?.getProduct()\n .getGroupGraphicItem()\n .find(({ attribute, type }: { attribute: LabelItem; type: string }) => {\n return type === 'text' && attribute.data?.[categoryField] === datum[categoryField];\n }, true)?.AABBBounds;\n const outerLabelSpec = this._spec.outerLabel ?? {};\n let x1;\n let x2;\n let y1;\n let y2;\n if (this._isHorizontal()) {\n const spaceWidth = outerLabelSpec.spaceWidth ?? FUNNEL_LABEL_SPACE_WIDTH;\n const points = this.getPoints(datum);\n const shapeMiddleHeight = (Math.abs(points[0].y - points[1].y) + Math.abs(points[2].y - points[3].y)) / 2;\n if (this._spec.outerLabel.position === 'top' || this._funnelAlign === 'bottom') {\n y1 = this._getPolygonCenter(points).y - shapeMiddleHeight / 2 - spaceWidth;\n y2 = outerLabelSpec.alignLabel !== false ? outerLabelMarkBounds?.y2 + spaceWidth : y1 - spaceWidth;\n x1 = this._getPolygonCenter(points).x;\n y1 - y2 < FUNNEL_LABEL_LINE_LENGTH && (y2 = y1 - FUNNEL_LABEL_LINE_LENGTH);\n x2 = x1;\n } else {\n y1 = this._getPolygonCenter(points).y + shapeMiddleHeight / 2 + spaceWidth;\n y2 = outerLabelSpec.alignLabel !== false ? outerLabelMarkBounds?.y1 - spaceWidth : y1 + spaceWidth;\n x1 = this._getPolygonCenter(points).x;\n y2 - y1 < FUNNEL_LABEL_LINE_LENGTH && (y2 = y1 + FUNNEL_LABEL_LINE_LENGTH);\n x2 = x1;\n }\n return { x1, x2, y1, y2 };\n }\n const points = this.getPoints(datum);\n const shapeMiddleWidth = (Math.abs(points[0].x - points[1].x) + Math.abs(points[2].x - points[3].x)) / 2;\n const labelWidth = labelMarkBounds?.x2 - labelMarkBounds?.x1 || 0;\n\n const spaceWidth = outerLabelSpec.spaceWidth ?? FUNNEL_LABEL_SPACE_WIDTH;\n if (this._spec.outerLabel.position === 'right' || this._funnelAlign === 'left') {\n x1 = this._getPolygonCenter(points).x + Math.max(labelWidth / 2, shapeMiddleWidth / 2) + spaceWidth;\n x2 = outerLabelSpec.alignLabel !== false ? outerLabelMarkBounds?.x1 - spaceWidth : x1 + spaceWidth;\n y1 = this._getPolygonCenter(points).y;\n x2 - x1 < FUNNEL_LABEL_LINE_LENGTH && (x2 = x1 + FUNNEL_LABEL_LINE_LENGTH);\n y2 = y1;\n } else {\n x1 = this._getPolygonCenter(points).x - Math.max(labelWidth / 2, shapeMiddleWidth / 2) - spaceWidth;\n x2 = outerLabelSpec.alignLabel !== false ? outerLabelMarkBounds?.x2 + spaceWidth : x1 - spaceWidth;\n y1 = this._getPolygonCenter(points).y;\n x1 - x2 < FUNNEL_LABEL_LINE_LENGTH && (x2 = x1 - FUNNEL_LABEL_LINE_LENGTH);\n y2 = y1;\n }\n return { x1, x2, y1, y2 };\n }\n\n protected _computeMaxSize() {\n const size = this._isHorizontal() ? this.getLayoutRect().height : this.getLayoutRect().width;\n const maxSize = this._spec.maxSize ?? FUNNEL_MAX_SIZE;\n return calcLayoutNumber(maxSize, size);\n }\n\n protected _computeMinSize() {\n const size = this._isHorizontal() ? this.getLayoutRect().height : this.getLayoutRect().width;\n const minSize = this._spec.minSize ?? FUNNEL_MIN_SIZE;\n return calcLayoutNumber(minSize, size);\n }\n\n protected _isHorizontal() {\n return this._funnelOrient === 'left' || this._funnelOrient === 'right';\n }\n\n private _isReverse() {\n return this._funnelOrient === 'bottom' || this._funnelOrient === 'right';\n }\n\n getDefaultShapeType(): string {\n return 'square';\n }\n\n getActiveMarks(): IMark[] {\n return [this._funnelMark];\n }\n}\n\nexport const registerFunnelSeries = () => {\n registerPolygonMark();\n registerTextMark();\n registerRuleMark();\n Factory.registerSeries(FunnelSeries.type, FunnelSeries);\n Factory.registerAnimation('funnel', (params: any, preset: FunnelAppearPreset) => ({\n appear: preset === 'clipIn' ? undefined : { type: 'fadeIn' },\n ...FadeInOutAnimation\n }));\n registerCartesianGroupClipAnimation();\n registerFadeInOutAnimation();\n};\n"]}
@@ -0,0 +1,7 @@
1
+ import type { IAnimationTypeConfig } from '@visactor/vgrammar-core';
2
+ export type ProgressLikeAppearPreset = 'grow' | 'fadeIn';
3
+ export interface IProgressLikeAnimationParams {
4
+ startAngle?: number;
5
+ }
6
+ export declare function gaugePointerPresetAnimation(params: IProgressLikeAnimationParams, preset: ProgressLikeAppearPreset): IAnimationTypeConfig;
7
+ export declare const registerGaugePointerAnimation: () => void;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ }), exports.registerGaugePointerAnimation = exports.gaugePointerPresetAnimation = void 0;
6
+
7
+ const core_1 = require("../../core"), Appear_Grow = params => ({
8
+ channel: {
9
+ angle: {
10
+ from: params.startAngle + Math.PI / 2
11
+ }
12
+ }
13
+ }), Appear_FadeIn = {
14
+ type: "fadeIn"
15
+ };
16
+
17
+ function gaugePointerPresetAnimation(params, preset) {
18
+ return "fadeIn" === preset ? Appear_FadeIn : Appear_Grow(params);
19
+ }
20
+
21
+ exports.gaugePointerPresetAnimation = gaugePointerPresetAnimation;
22
+
23
+ const registerGaugePointerAnimation = () => {
24
+ core_1.Factory.registerAnimation("gaugePointer", ((params, preset) => {
25
+ const animation = gaugePointerPresetAnimation(params, preset);
26
+ return {
27
+ appear: animation,
28
+ enter: animation,
29
+ disappear: {
30
+ type: "fadeOut"
31
+ }
32
+ };
33
+ }));
34
+ };
35
+
36
+ exports.registerGaugePointerAnimation = registerGaugePointerAnimation;
37
+ //# sourceMappingURL=animation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/series/gauge/animation.ts"],"names":[],"mappings":";;;AACA,qCAAqC;AAQrC,MAAM,WAAW,GAAG,CAAC,MAAoC,EAAwB,EAAE,CAAC,CAAC;IACnF,OAAO,EAAE;QACP,KAAK,EAAE;YACL,IAAI,EAAE,MAAM,CAAC,UAAU,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC;SACtC;KACF;CACF,CAAC,CAAC;AAEH,MAAM,aAAa,GAAyB;IAC1C,IAAI,EAAE,QAAQ;CACf,CAAC;AAEF,SAAgB,2BAA2B,CAAC,MAAoC,EAAE,MAAgC;IAChH,QAAQ,MAAM,EAAE;QACd,KAAK,QAAQ;YACX,OAAO,aAAa,CAAC;QACvB;YACE,OAAO,WAAW,CAAC,MAAM,CAAC,CAAC;KAC9B;AACH,CAAC;AAPD,kEAOC;AAEM,MAAM,6BAA6B,GAAG,GAAG,EAAE;IAChD,cAAO,CAAC,iBAAiB,CACvB,cAAc,EACd,CAAC,MAAoC,EAAE,MAAgC,EAAE,EAAE;QACzE,MAAM,SAAS,GAAG,2BAA2B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC9D,OAAO;YACL,MAAM,EAAE,SAAS;YACjB,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;SAC/B,CAAC;IACJ,CAAC,CACF,CAAC;AACJ,CAAC,CAAC;AAZW,QAAA,6BAA6B,iCAYxC","file":"animation.js","sourcesContent":["import type { IAnimationTypeConfig } from '@visactor/vgrammar-core';\nimport { Factory } from '../../core';\n\nexport type ProgressLikeAppearPreset = 'grow' | 'fadeIn';\n\nexport interface IProgressLikeAnimationParams {\n startAngle?: number;\n}\n\nconst Appear_Grow = (params: IProgressLikeAnimationParams): IAnimationTypeConfig => ({\n channel: {\n angle: {\n from: params.startAngle + Math.PI / 2\n }\n }\n});\n\nconst Appear_FadeIn: IAnimationTypeConfig = {\n type: 'fadeIn'\n};\n\nexport function gaugePointerPresetAnimation(params: IProgressLikeAnimationParams, preset: ProgressLikeAppearPreset) {\n switch (preset) {\n case 'fadeIn':\n return Appear_FadeIn;\n default:\n return Appear_Grow(params);\n }\n}\n\nexport const registerGaugePointerAnimation = () => {\n Factory.registerAnimation(\n 'gaugePointer',\n (params: IProgressLikeAnimationParams, preset: ProgressLikeAppearPreset) => {\n const animation = gaugePointerPresetAnimation(params, preset);\n return {\n appear: animation,\n enter: animation,\n disappear: { type: 'fadeOut' }\n };\n }\n );\n};\n"]}
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: !0
5
5
  }), exports.registerGaugePointerSeries = exports.GaugePointerSeries = void 0;
6
6
 
7
- const type_1 = require("../../mark/interface/type"), vutils_1 = require("@visactor/vutils"), type_2 = require("../interface/type"), utils_1 = require("../../animation/utils"), progress_like_1 = require("../polar/progress-like"), path_1 = require("../../mark/path"), rect_1 = require("../../mark/rect"), constant_1 = require("./constant"), factory_1 = require("../../core/factory");
7
+ const type_1 = require("../../mark/interface/type"), vutils_1 = require("@visactor/vutils"), type_2 = require("../interface/type"), utils_1 = require("../../animation/utils"), progress_like_1 = require("../polar/progress-like"), path_1 = require("../../mark/path"), rect_1 = require("../../mark/rect"), constant_1 = require("./constant"), factory_1 = require("../../core/factory"), animation_1 = require("./animation");
8
8
 
9
9
  class GaugePointerSeries extends progress_like_1.ProgressLikeSeries {
10
10
  constructor() {
@@ -110,7 +110,7 @@ class GaugePointerSeries extends progress_like_1.ProgressLikeSeries {
110
110
  initAnimation() {
111
111
  var _a, _b, _c;
112
112
  const appearPreset = null === (_b = null === (_a = this._spec) || void 0 === _a ? void 0 : _a.animationAppear) || void 0 === _b ? void 0 : _b.preset;
113
- this._pointerMark.setAnimationConfig((0, utils_1.animationConfig)(null === (_c = factory_1.Factory.getAnimationInKey("circularProgress")) || void 0 === _c ? void 0 : _c({
113
+ this._pointerMark.setAnimationConfig((0, utils_1.animationConfig)(null === (_c = factory_1.Factory.getAnimationInKey("gaugePointer")) || void 0 === _c ? void 0 : _c({
114
114
  startAngle: this._startAngle
115
115
  }, appearPreset), (0, utils_1.userAnimationConfig)(type_2.SeriesMarkNameEnum.pointer, this._spec, this._markAttributeContext)));
116
116
  }
@@ -126,7 +126,7 @@ exports.GaugePointerSeries = GaugePointerSeries, GaugePointerSeries.type = type_
126
126
  GaugePointerSeries.mark = constant_1.gaugePointerSeriesMark;
127
127
 
128
128
  const registerGaugePointerSeries = () => {
129
- (0, path_1.registerPathMark)(), (0, rect_1.registerRectMark)(), (0, progress_like_1.registerCircularProgressAnimation)(),
129
+ (0, path_1.registerPathMark)(), (0, rect_1.registerRectMark)(), (0, animation_1.registerGaugePointerAnimation)(),
130
130
  factory_1.Factory.registerSeries(GaugePointerSeries.type, GaugePointerSeries);
131
131
  };
132
132
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/series/gauge/gauge-pointer.ts"],"names":[],"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,2BAAmB,EAAC,yBAAkB,CAAC,OAAO,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,qBAAqB,CAAC,CACxF,CACF,CAAC;IACJ,CAAC;IAED,mBAAmB;QACjB,OAAO,QAAQ,CAAC;IAClB,CAAC;IAED,cAAc;QACZ,OAAO,EAAE,CAAC;IACZ,CAAC;;AA9LH,gDA+LC;AA5LiB,uBAAI,GAAW,qBAAc,CAAC,YAAY,CAAC;AAG3C,uBAAI,GAAkB,iCAAsB,CAAC;AA2LxD,MAAM,0BAA0B,GAAG,GAAG,EAAE;IAC7C,IAAA,uBAAgB,GAAE,CAAC;IACnB,IAAA,uBAAgB,GAAE,CAAC;IACnB,IAAA,iDAAiC,GAAE,CAAC;IACpC,iBAAO,CAAC,cAAc,CAAC,kBAAkB,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;AACtE,CAAC,CAAC;AALW,QAAA,0BAA0B,8BAKrC","file":"gauge-pointer.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport type { IMark } from '../../mark/interface';\nimport { MarkTypeEnum } from '../../mark/interface/type';\nimport { isValid } from '@visactor/vutils';\nimport type { SeriesMarkMap } from '../interface';\nimport { SeriesMarkNameEnum, SeriesTypeEnum } from '../interface/type';\nimport type { IGaugePointerSeriesSpec, IGaugePointerSeriesTheme, PinMarkSpec, PointerMarkSpec } from './interface';\nimport type { Datum, Maybe } from '../../typings';\nimport type { IPathMark } from '../../mark/path';\nimport { animationConfig, userAnimationConfig } from '../../animation/utils';\nimport { ProgressLikeSeries, registerCircularProgressAnimation } from '../polar/progress-like';\nimport type { IRectMark } from '../../mark/rect';\nimport type { IStateAnimateSpec } from '../../animation/spec';\nimport { PathMark, registerPathMark } from '../../mark/path';\nimport { RectMark, registerRectMark } from '../../mark/rect';\nimport { gaugePointerSeriesMark } from './constant';\nimport { Factory } from '../../core/factory';\n\nexport class GaugePointerSeries<\n T extends IGaugePointerSeriesSpec = IGaugePointerSeriesSpec\n> extends ProgressLikeSeries<T> {\n static readonly type: string = SeriesTypeEnum.gaugePointer;\n type = SeriesTypeEnum.gaugePointer;\n\n static readonly mark: SeriesMarkMap = gaugePointerSeriesMark;\n\n private _pinMark: IPathMark | null = null;\n private _pointerMark: IPathMark | IRectMark | null = null;\n private _pinBackgroundMark: IPathMark | null = null;\n protected _stack: boolean = false;\n\n protected _pointerType: MarkTypeEnum;\n\n setAttrFromSpec(): void {\n super.setAttrFromSpec();\n // 半径信息\n this.setRadiusField(this._spec.radiusField);\n\n this._pointerType = this._spec.pointer?.type === 'rect' ? MarkTypeEnum.rect : MarkTypeEnum.path;\n }\n\n initMark(): void {\n this._pinBackgroundMark = this._createMark(GaugePointerSeries.mark.pinBackground) as IPathMark;\n this._pointerMark = this._createMark(\n {\n ...GaugePointerSeries.mark.pointer,\n type: this._pointerType\n },\n {\n isSeriesMark: true\n }\n ) as IPathMark;\n this._pinMark = this._createMark(GaugePointerSeries.mark.pin) as IPathMark;\n }\n\n initMarkStyle(): void {\n this.initPinBackgroundMarkStyle();\n this.initPointerMarkStyle();\n this.initPinMarkStyle();\n }\n\n initGroups() {\n // do nothing\n }\n\n private initPointerMarkStyle() {\n const pointerMark = this._pointerMark;\n const pointerSpec = this._spec.pointer;\n if (pointerMark) {\n this.setMarkStyle(pointerMark, {\n x: (datum: Datum) => {\n const { x } = this._getPointerAnchor(datum, pointerSpec);\n const dx = this._getPointerWidth() * (pointerSpec?.center?.[0] ?? 0);\n return x - dx;\n },\n y: (datum: Datum) => {\n const { y } = this._getPointerAnchor(datum, pointerSpec);\n const dy = this._getPointerHeight(datum) * (pointerSpec?.center?.[1] ?? 0);\n return y - dy;\n },\n anchor: (datum: Datum) => {\n const { x, y } = this._getPointerAnchor(datum, pointerSpec);\n return [x, y];\n },\n fill: this.getColorAttribute(),\n zIndex: 200\n });\n if (this._pointerType === MarkTypeEnum.path) {\n this.setMarkStyle(pointerMark as IPathMark, {\n scaleX: this._getPointerWidth.bind(this),\n scaleY: this._getPointerHeight.bind(this),\n angle: (datum: Datum) => this._getPointerAngle(datum) + Math.PI / 2\n });\n } else {\n this.setMarkStyle(pointerMark as IRectMark, {\n width: this._getPointerWidth.bind(this),\n height: this._getPointerHeight.bind(this),\n angle: (datum: Datum) => this._getPointerAngle(datum) - Math.PI / 2\n });\n }\n this._trigger.registerMark(pointerMark);\n }\n }\n\n protected initTooltip() {\n super.initTooltip();\n\n this._pointerMark && this._tooltipHelper.activeTriggerSet.mark.add(this._pointerMark);\n }\n\n protected _getPointerAnchor(datum: Datum, markSpec: PinMarkSpec | PointerMarkSpec) {\n if (markSpec.isOnCenter ?? true) {\n return this.angleAxisHelper.center();\n }\n return this.radiusAxisHelper.coordToPoint({\n radius: this._innerRadius * this._computeLayoutRadius(),\n angle: this.angleAxisHelper.dataToPosition([datum[this._angleField[0]]])\n });\n }\n\n protected _getPointerWidth() {\n return this._spec.pointer.width * this._computeLayoutRadius();\n }\n\n protected _getPointerHeight(datum: Datum) {\n const pointerSpec = this._spec.pointer;\n const radiusField = this._radiusField[0];\n if (isValid(this.radiusAxisHelper) && isValid(radiusField)) {\n return (\n this.radiusAxisHelper.dataToPosition([datum[radiusField]]) -\n (pointerSpec?.innerPadding ?? 0) -\n (pointerSpec?.outerPadding ?? 10)\n );\n }\n return pointerSpec.height * this._computeLayoutRadius();\n }\n\n protected _getPointerAngle(datum: Datum) {\n return this.angleAxisHelper.dataToPosition([datum[this._angleField[0]]]);\n }\n\n protected _getRotatedPointerCenterOffset(datum: Datum) {\n const pointerSpec = this._spec.pointer;\n const x = this._getPointerWidth() * (pointerSpec?.center?.[0] ?? 0);\n const y = -this._getPointerHeight(datum) * (pointerSpec?.center?.[1] ?? 0);\n const angle = this._getPointerAngle(datum) - Math.PI / 2;\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n const x1 = x * cos + y * sin;\n const y1 = y * cos - x * sin;\n return {\n x: x1,\n y: -y1\n };\n }\n\n private initPinBackgroundMarkStyle() {\n const pinBackgroundMark = this._pinBackgroundMark;\n const pinBackgroundSpec = this._spec.pinBackground;\n if (pinBackgroundMark) {\n this.setMarkStyle(pinBackgroundMark, {\n x: (datum: Datum) => this._getPointerAnchor(datum, pinBackgroundSpec).x,\n y: (datum: Datum) => this._getPointerAnchor(datum, pinBackgroundSpec).y,\n scaleX: () => pinBackgroundSpec.width * this._computeLayoutRadius(),\n scaleY: () => pinBackgroundSpec.height * this._computeLayoutRadius(),\n fill: this.getColorAttribute(),\n zIndex: 100\n });\n }\n }\n\n private initPinMarkStyle() {\n const pinMark = this._pinMark;\n const pinSpec = this._spec.pin;\n if (pinMark) {\n this.setMarkStyle(pinMark, {\n x: (datum: Datum) => this._getPointerAnchor(datum, pinSpec).x,\n y: (datum: Datum) => this._getPointerAnchor(datum, pinSpec).y,\n scaleX: () => pinSpec.width * this._computeLayoutRadius(),\n scaleY: () => pinSpec.height * this._computeLayoutRadius(),\n fill: this.getColorAttribute(),\n zIndex: 300\n });\n }\n }\n\n initAnimation() {\n const appearPreset = (this._spec?.animationAppear as IStateAnimateSpec<any>)?.preset;\n\n this._pointerMark.setAnimationConfig(\n animationConfig(\n Factory.getAnimationInKey('circularProgress')?.(\n {\n startAngle: this._startAngle\n },\n appearPreset\n ),\n userAnimationConfig(SeriesMarkNameEnum.pointer, this._spec, this._markAttributeContext)\n )\n );\n }\n\n getDefaultShapeType() {\n return 'circle';\n }\n\n getActiveMarks(): IMark[] {\n return [];\n }\n}\n\nexport const registerGaugePointerSeries = () => {\n registerPathMark();\n registerRectMark();\n registerCircularProgressAnimation();\n Factory.registerSeries(GaugePointerSeries.type, GaugePointerSeries);\n};\n"]}
1
+ {"version":3,"sources":["../src/series/gauge/gauge-pointer.ts"],"names":[],"mappings":";;;AAEA,oDAAyD;AACzD,6CAA2C;AAE3C,4CAAuE;AAIvE,iDAA6E;AAC7E,0DAA2F;AAG3F,0CAA6D;AAC7D,0CAA6D;AAC7D,yCAAoD;AACpD,gDAA6C;AAC7C,2CAA4D;AAE5D,MAAa,kBA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CAAC;IAED,cAAc;QACZ,OAAO,EAAE,CAAC;IACZ,CAAC;;AA9LH,gDA+LC;AA5LiB,uBAAI,GAAW,qBAAc,CAAC,YAAY,CAAC;AAG3C,uBAAI,GAAkB,iCAAsB,CAAC;AA2LxD,MAAM,0BAA0B,GAAG,GAAG,EAAE;IAC7C,IAAA,uBAAgB,GAAE,CAAC;IACnB,IAAA,uBAAgB,GAAE,CAAC;IACnB,IAAA,yCAA6B,GAAE,CAAC;IAChC,iBAAO,CAAC,cAAc,CAAC,kBAAkB,CAAC,IAAI,EAAE,kBAAkB,CAAC,CAAC;AACtE,CAAC,CAAC;AALW,QAAA,0BAA0B,8BAKrC","file":"gauge-pointer.js","sourcesContent":["/* eslint-disable no-duplicate-imports */\nimport type { IMark } from '../../mark/interface';\nimport { MarkTypeEnum } from '../../mark/interface/type';\nimport { isValid } from '@visactor/vutils';\nimport type { SeriesMarkMap } from '../interface';\nimport { SeriesMarkNameEnum, SeriesTypeEnum } from '../interface/type';\nimport type { IGaugePointerSeriesSpec, IGaugePointerSeriesTheme, PinMarkSpec, PointerMarkSpec } from './interface';\nimport type { Datum, Maybe } from '../../typings';\nimport type { IPathMark } from '../../mark/path';\nimport { animationConfig, userAnimationConfig } from '../../animation/utils';\nimport { ProgressLikeSeries, registerProgressLikeAnimation } from '../polar/progress-like';\nimport type { IRectMark } from '../../mark/rect';\nimport type { IStateAnimateSpec } from '../../animation/spec';\nimport { PathMark, registerPathMark } from '../../mark/path';\nimport { RectMark, registerRectMark } from '../../mark/rect';\nimport { gaugePointerSeriesMark } from './constant';\nimport { Factory } from '../../core/factory';\nimport { registerGaugePointerAnimation } from './animation';\n\nexport class GaugePointerSeries<\n T extends IGaugePointerSeriesSpec = IGaugePointerSeriesSpec\n> extends ProgressLikeSeries<T> {\n static readonly type: string = SeriesTypeEnum.gaugePointer;\n type = SeriesTypeEnum.gaugePointer;\n\n static readonly mark: SeriesMarkMap = gaugePointerSeriesMark;\n\n private _pinMark: IPathMark | null = null;\n private _pointerMark: IPathMark | IRectMark | null = null;\n private _pinBackgroundMark: IPathMark | null = null;\n protected _stack: boolean = false;\n\n protected _pointerType: MarkTypeEnum;\n\n setAttrFromSpec(): void {\n super.setAttrFromSpec();\n // 半径信息\n this.setRadiusField(this._spec.radiusField);\n\n this._pointerType = this._spec.pointer?.type === 'rect' ? MarkTypeEnum.rect : MarkTypeEnum.path;\n }\n\n initMark(): void {\n this._pinBackgroundMark = this._createMark(GaugePointerSeries.mark.pinBackground) as IPathMark;\n this._pointerMark = this._createMark(\n {\n ...GaugePointerSeries.mark.pointer,\n type: this._pointerType\n },\n {\n isSeriesMark: true\n }\n ) as IPathMark;\n this._pinMark = this._createMark(GaugePointerSeries.mark.pin) as IPathMark;\n }\n\n initMarkStyle(): void {\n this.initPinBackgroundMarkStyle();\n this.initPointerMarkStyle();\n this.initPinMarkStyle();\n }\n\n initGroups() {\n // do nothing\n }\n\n private initPointerMarkStyle() {\n const pointerMark = this._pointerMark;\n const pointerSpec = this._spec.pointer;\n if (pointerMark) {\n this.setMarkStyle(pointerMark, {\n x: (datum: Datum) => {\n const { x } = this._getPointerAnchor(datum, pointerSpec);\n const dx = this._getPointerWidth() * (pointerSpec?.center?.[0] ?? 0);\n return x - dx;\n },\n y: (datum: Datum) => {\n const { y } = this._getPointerAnchor(datum, pointerSpec);\n const dy = this._getPointerHeight(datum) * (pointerSpec?.center?.[1] ?? 0);\n return y - dy;\n },\n anchor: (datum: Datum) => {\n const { x, y } = this._getPointerAnchor(datum, pointerSpec);\n return [x, y];\n },\n fill: this.getColorAttribute(),\n zIndex: 200\n });\n if (this._pointerType === MarkTypeEnum.path) {\n this.setMarkStyle(pointerMark as IPathMark, {\n scaleX: this._getPointerWidth.bind(this),\n scaleY: this._getPointerHeight.bind(this),\n angle: (datum: Datum) => this._getPointerAngle(datum) + Math.PI / 2\n });\n } else {\n this.setMarkStyle(pointerMark as IRectMark, {\n width: this._getPointerWidth.bind(this),\n height: this._getPointerHeight.bind(this),\n angle: (datum: Datum) => this._getPointerAngle(datum) - Math.PI / 2\n });\n }\n this._trigger.registerMark(pointerMark);\n }\n }\n\n protected initTooltip() {\n super.initTooltip();\n\n this._pointerMark && this._tooltipHelper.activeTriggerSet.mark.add(this._pointerMark);\n }\n\n protected _getPointerAnchor(datum: Datum, markSpec: PinMarkSpec | PointerMarkSpec) {\n if (markSpec.isOnCenter ?? true) {\n return this.angleAxisHelper.center();\n }\n return this.radiusAxisHelper.coordToPoint({\n radius: this._innerRadius * this._computeLayoutRadius(),\n angle: this.angleAxisHelper.dataToPosition([datum[this._angleField[0]]])\n });\n }\n\n protected _getPointerWidth() {\n return this._spec.pointer.width * this._computeLayoutRadius();\n }\n\n protected _getPointerHeight(datum: Datum) {\n const pointerSpec = this._spec.pointer;\n const radiusField = this._radiusField[0];\n if (isValid(this.radiusAxisHelper) && isValid(radiusField)) {\n return (\n this.radiusAxisHelper.dataToPosition([datum[radiusField]]) -\n (pointerSpec?.innerPadding ?? 0) -\n (pointerSpec?.outerPadding ?? 10)\n );\n }\n return pointerSpec.height * this._computeLayoutRadius();\n }\n\n protected _getPointerAngle(datum: Datum) {\n return this.angleAxisHelper.dataToPosition([datum[this._angleField[0]]]);\n }\n\n protected _getRotatedPointerCenterOffset(datum: Datum) {\n const pointerSpec = this._spec.pointer;\n const x = this._getPointerWidth() * (pointerSpec?.center?.[0] ?? 0);\n const y = -this._getPointerHeight(datum) * (pointerSpec?.center?.[1] ?? 0);\n const angle = this._getPointerAngle(datum) - Math.PI / 2;\n const cos = Math.cos(angle);\n const sin = Math.sin(angle);\n const x1 = x * cos + y * sin;\n const y1 = y * cos - x * sin;\n return {\n x: x1,\n y: -y1\n };\n }\n\n private initPinBackgroundMarkStyle() {\n const pinBackgroundMark = this._pinBackgroundMark;\n const pinBackgroundSpec = this._spec.pinBackground;\n if (pinBackgroundMark) {\n this.setMarkStyle(pinBackgroundMark, {\n x: (datum: Datum) => this._getPointerAnchor(datum, pinBackgroundSpec).x,\n y: (datum: Datum) => this._getPointerAnchor(datum, pinBackgroundSpec).y,\n scaleX: () => pinBackgroundSpec.width * this._computeLayoutRadius(),\n scaleY: () => pinBackgroundSpec.height * this._computeLayoutRadius(),\n fill: this.getColorAttribute(),\n zIndex: 100\n });\n }\n }\n\n private initPinMarkStyle() {\n const pinMark = this._pinMark;\n const pinSpec = this._spec.pin;\n if (pinMark) {\n this.setMarkStyle(pinMark, {\n x: (datum: Datum) => this._getPointerAnchor(datum, pinSpec).x,\n y: (datum: Datum) => this._getPointerAnchor(datum, pinSpec).y,\n scaleX: () => pinSpec.width * this._computeLayoutRadius(),\n scaleY: () => pinSpec.height * this._computeLayoutRadius(),\n fill: this.getColorAttribute(),\n zIndex: 300\n });\n }\n }\n\n initAnimation() {\n const appearPreset = (this._spec?.animationAppear as IStateAnimateSpec<any>)?.preset;\n\n this._pointerMark.setAnimationConfig(\n animationConfig(\n Factory.getAnimationInKey('gaugePointer')?.(\n {\n startAngle: this._startAngle\n },\n appearPreset\n ),\n userAnimationConfig(SeriesMarkNameEnum.pointer, this._spec, this._markAttributeContext)\n )\n );\n }\n\n getDefaultShapeType() {\n return 'circle';\n }\n\n getActiveMarks(): IMark[] {\n return [];\n }\n}\n\nexport const registerGaugePointerSeries = () => {\n registerPathMark();\n registerRectMark();\n registerGaugePointerAnimation();\n Factory.registerSeries(GaugePointerSeries.type, GaugePointerSeries);\n};\n"]}
@@ -122,7 +122,7 @@ exports.GaugeSeries = GaugeSeries, GaugeSeries.type = type_1.SeriesTypeEnum.gaug
122
122
  GaugeSeries.mark = constant_2.gaugeSeriesMark, GaugeSeries.transformerConstructor = gauge_transformer_1.GaugeSeriesSpecTransformer;
123
123
 
124
124
  const registerGaugeSeries = () => {
125
- (0, progress_arc_1.registerProgressArcMark)(), (0, progress_like_2.registerCircularProgressAnimation)(),
125
+ (0, progress_arc_1.registerProgressArcMark)(), (0, progress_like_2.registerProgressLikeAnimation)(),
126
126
  factory_1.Factory.registerSeries(GaugeSeries.type, GaugeSeries);
127
127
  };
128
128