@visactor/vchart 1.3.0-beta.4 → 1.3.0-beta.6

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 (161) hide show
  1. package/build/es5/index.js +1 -1
  2. package/build/index.js +400 -208
  3. package/build/index.min.js +2 -2
  4. package/build/tsconfig.tsbuildinfo +1 -1
  5. package/cjs/chart/area/area.js +2 -1
  6. package/cjs/chart/area/area.js.map +1 -1
  7. package/cjs/chart/base-chart.d.ts +2 -1
  8. package/cjs/chart/base-chart.js +12 -0
  9. package/cjs/chart/base-chart.js.map +1 -1
  10. package/cjs/chart/interface/chart.d.ts +2 -1
  11. package/cjs/chart/interface/chart.js.map +1 -1
  12. package/cjs/chart/line/line.js +2 -1
  13. package/cjs/chart/line/line.js.map +1 -1
  14. package/cjs/chart/radar/radar.js +2 -1
  15. package/cjs/chart/radar/radar.js.map +1 -1
  16. package/cjs/chart/util.js +1 -2
  17. package/cjs/compile/compiler.d.ts +2 -1
  18. package/cjs/compile/compiler.js +4 -0
  19. package/cjs/compile/compiler.js.map +1 -1
  20. package/cjs/compile/mark/interface.d.ts +2 -0
  21. package/cjs/compile/mark/interface.js.map +1 -1
  22. package/cjs/component/index.js +2 -1
  23. package/cjs/component/title/title.js +1 -1
  24. package/cjs/component/title/title.js.map +1 -1
  25. package/cjs/component/tooltip/handler/base.js.map +1 -1
  26. package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.d.ts +1 -1
  27. package/cjs/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
  28. package/cjs/component/tooltip/handler/dom/interface.d.ts +9 -12
  29. package/cjs/component/tooltip/handler/dom/interface.js.map +1 -1
  30. package/cjs/component/tooltip/handler/dom/model/content-column-model.d.ts +4 -6
  31. package/cjs/component/tooltip/handler/dom/model/content-column-model.js +17 -15
  32. package/cjs/component/tooltip/handler/dom/model/content-column-model.js.map +1 -1
  33. package/cjs/component/tooltip/handler/dom/model/title-model.js +3 -3
  34. package/cjs/component/tooltip/handler/dom/model/title-model.js.map +1 -1
  35. package/cjs/component/tooltip/handler/dom/util.js +18 -11
  36. package/cjs/component/tooltip/handler/dom/util.js.map +1 -1
  37. package/cjs/component/tooltip/handler/utils/attribute.js +23 -23
  38. package/cjs/component/tooltip/handler/utils/attribute.js.map +1 -1
  39. package/cjs/component/tooltip/handler/utils/compose.d.ts +2 -2
  40. package/cjs/component/tooltip/handler/utils/compose.js +13 -10
  41. package/cjs/component/tooltip/handler/utils/compose.js.map +1 -1
  42. package/cjs/component/tooltip/handler/utils/get-spec.js +72 -54
  43. package/cjs/component/tooltip/handler/utils/get-spec.js.map +1 -1
  44. package/cjs/component/tooltip/handler/utils/style.d.ts +1 -1
  45. package/cjs/component/tooltip/handler/utils/style.js +15 -10
  46. package/cjs/component/tooltip/handler/utils/style.js.map +1 -1
  47. package/cjs/component/tooltip/interface/theme.d.ts +1 -0
  48. package/cjs/component/tooltip/interface/theme.js.map +1 -1
  49. package/cjs/component/tooltip/tooltip.d.ts +1 -1
  50. package/cjs/component/tooltip/tooltip.js.map +1 -1
  51. package/cjs/constant/marker.js +1 -2
  52. package/cjs/core/factory.js +2 -1
  53. package/cjs/core/index.d.ts +1 -1
  54. package/cjs/core/index.js +1 -1
  55. package/cjs/core/index.js.map +1 -1
  56. package/cjs/core/vchart.d.ts +4 -1
  57. package/cjs/core/vchart.js +41 -11
  58. package/cjs/core/vchart.js.map +1 -1
  59. package/cjs/data/initialize.js +9 -7
  60. package/cjs/data/initialize.js.map +1 -1
  61. package/cjs/series/area/interface.d.ts +1 -0
  62. package/cjs/series/area/interface.js.map +1 -1
  63. package/cjs/series/base/base-series.js +2 -1
  64. package/cjs/series/base/base-series.js.map +1 -1
  65. package/cjs/series/base/tooltip-helper.js +1 -0
  66. package/cjs/series/base/tooltip-helper.js.map +1 -1
  67. package/cjs/series/line/interface.d.ts +1 -0
  68. package/cjs/series/line/interface.js.map +1 -1
  69. package/cjs/series/mixin/line-mixin.d.ts +10 -2
  70. package/cjs/series/mixin/line-mixin.js +53 -6
  71. package/cjs/series/mixin/line-mixin.js.map +1 -1
  72. package/cjs/series/polar/polar.js +2 -1
  73. package/cjs/series/polar/polar.js.map +1 -1
  74. package/cjs/series/radar/interface.d.ts +1 -0
  75. package/cjs/series/radar/interface.js.map +1 -1
  76. package/cjs/typings/tooltip/label.d.ts +10 -0
  77. package/cjs/typings/tooltip/label.js +6 -0
  78. package/cjs/typings/tooltip/label.js.map +1 -0
  79. package/cjs/typings/tooltip/line.d.ts +3 -3
  80. package/cjs/typings/tooltip/line.js.map +1 -1
  81. package/cjs/typings/tooltip/shape.d.ts +3 -0
  82. package/cjs/typings/tooltip/shape.js.map +1 -1
  83. package/esm/chart/area/area.js +2 -1
  84. package/esm/chart/area/area.js.map +1 -1
  85. package/esm/chart/base-chart.d.ts +2 -1
  86. package/esm/chart/base-chart.js +12 -0
  87. package/esm/chart/base-chart.js.map +1 -1
  88. package/esm/chart/interface/chart.d.ts +2 -1
  89. package/esm/chart/interface/chart.js.map +1 -1
  90. package/esm/chart/line/line.js +2 -1
  91. package/esm/chart/line/line.js.map +1 -1
  92. package/esm/chart/radar/radar.js +2 -1
  93. package/esm/chart/radar/radar.js.map +1 -1
  94. package/esm/chart/util.js +1 -2
  95. package/esm/compile/compiler.d.ts +2 -1
  96. package/esm/compile/compiler.js +4 -0
  97. package/esm/compile/compiler.js.map +1 -1
  98. package/esm/compile/mark/interface.d.ts +2 -0
  99. package/esm/compile/mark/interface.js.map +1 -1
  100. package/esm/component/index.js +2 -1
  101. package/esm/component/title/title.js +1 -1
  102. package/esm/component/title/title.js.map +1 -1
  103. package/esm/component/tooltip/handler/base.js.map +1 -1
  104. package/esm/component/tooltip/handler/dom/dom-tooltip-handler.d.ts +1 -1
  105. package/esm/component/tooltip/handler/dom/dom-tooltip-handler.js.map +1 -1
  106. package/esm/component/tooltip/handler/dom/interface.d.ts +9 -12
  107. package/esm/component/tooltip/handler/dom/interface.js.map +1 -1
  108. package/esm/component/tooltip/handler/dom/model/content-column-model.d.ts +4 -6
  109. package/esm/component/tooltip/handler/dom/model/content-column-model.js +16 -14
  110. package/esm/component/tooltip/handler/dom/model/content-column-model.js.map +1 -1
  111. package/esm/component/tooltip/handler/dom/model/title-model.js +3 -3
  112. package/esm/component/tooltip/handler/dom/model/title-model.js.map +1 -1
  113. package/esm/component/tooltip/handler/dom/util.js +18 -11
  114. package/esm/component/tooltip/handler/dom/util.js.map +1 -1
  115. package/esm/component/tooltip/handler/utils/attribute.js +22 -23
  116. package/esm/component/tooltip/handler/utils/attribute.js.map +1 -1
  117. package/esm/component/tooltip/handler/utils/compose.d.ts +2 -2
  118. package/esm/component/tooltip/handler/utils/compose.js +11 -10
  119. package/esm/component/tooltip/handler/utils/compose.js.map +1 -1
  120. package/esm/component/tooltip/handler/utils/get-spec.js +70 -50
  121. package/esm/component/tooltip/handler/utils/get-spec.js.map +1 -1
  122. package/esm/component/tooltip/handler/utils/style.d.ts +1 -1
  123. package/esm/component/tooltip/handler/utils/style.js +16 -9
  124. package/esm/component/tooltip/handler/utils/style.js.map +1 -1
  125. package/esm/component/tooltip/interface/theme.d.ts +1 -0
  126. package/esm/component/tooltip/interface/theme.js.map +1 -1
  127. package/esm/component/tooltip/tooltip.d.ts +1 -1
  128. package/esm/component/tooltip/tooltip.js.map +1 -1
  129. package/esm/constant/marker.js +1 -2
  130. package/esm/core/factory.js +2 -1
  131. package/esm/core/index.d.ts +1 -1
  132. package/esm/core/index.js +1 -1
  133. package/esm/core/index.js.map +1 -1
  134. package/esm/core/vchart.d.ts +4 -1
  135. package/esm/core/vchart.js +41 -11
  136. package/esm/core/vchart.js.map +1 -1
  137. package/esm/data/initialize.js +10 -7
  138. package/esm/data/initialize.js.map +1 -1
  139. package/esm/series/area/interface.d.ts +1 -0
  140. package/esm/series/area/interface.js.map +1 -1
  141. package/esm/series/base/base-series.js +2 -1
  142. package/esm/series/base/base-series.js.map +1 -1
  143. package/esm/series/base/tooltip-helper.js +1 -0
  144. package/esm/series/base/tooltip-helper.js.map +1 -1
  145. package/esm/series/line/interface.d.ts +1 -0
  146. package/esm/series/line/interface.js.map +1 -1
  147. package/esm/series/mixin/line-mixin.d.ts +10 -2
  148. package/esm/series/mixin/line-mixin.js +60 -5
  149. package/esm/series/mixin/line-mixin.js.map +1 -1
  150. package/esm/series/polar/polar.js +2 -1
  151. package/esm/series/polar/polar.js.map +1 -1
  152. package/esm/series/radar/interface.d.ts +1 -0
  153. package/esm/series/radar/interface.js.map +1 -1
  154. package/esm/typings/tooltip/label.d.ts +10 -0
  155. package/esm/typings/tooltip/label.js +2 -0
  156. package/esm/typings/tooltip/label.js.map +1 -0
  157. package/esm/typings/tooltip/line.d.ts +3 -3
  158. package/esm/typings/tooltip/line.js.map +1 -1
  159. package/esm/typings/tooltip/shape.d.ts +3 -0
  160. package/esm/typings/tooltip/shape.js.map +1 -1
  161. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/series/polar/polar.ts"],"names":[],"mappings":";;;AAGA,qCAAmE;AAGnE,6CAAgD;AAChD,gDAA4D;AAC5D,qDAAiD;AAIjD,MAAsB,WACpB,SAAQ,wBAAa;IADvB;;QAIW,eAAU,GAAY,OAAO,CAAC;QAE7B,iBAAY,GAAW,4BAAoB,CAAC;QAK5C,iBAAY,GAAW,CAAC,CAAC;QAKzB,gBAAW,GAAa,EAAE,CAAC;QAS3B,iBAAY,GAAa,EAAE,CAAC;IAsLxC,CAAC;IAxMC,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAGD,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAGD,aAAa;QACX,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IACD,aAAa,CAAC,CAAoB;QAChC,IAAI,CAAC,WAAW,GAAG,IAAA,cAAO,EAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAA,YAAK,EAAC,CAAC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,CAAC,IAAA,qBAAc,EAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE;YAClG,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;YACrB,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;YACvB,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;SACtB;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,wBAAwB;QACtB,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC9B,CAAC;IACD,uBAAuB;QACrB,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC9B,CAAC;IAED,aAAa;QACX,KAAK,CAAC,aAAa,EAAE,CAAC;QACtB,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAC1E,CAAC;IAES,oBAAoB;QAC5B,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;QACvD,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;IACzC,CAAC;IAED,oCAAoC;IAEpC,CAAC;CACF;AA/MD,kCA+MC","file":"polar.js","sourcesContent":["import type { IBaseScale } from '@visactor/vscale';\nimport type { IPoint, IPolarPoint } from '../../typings/coordinate';\nimport type { IPolarSeries } from '../interface';\nimport { array, shallowCompare, isValid, isNil } from '../../util';\nimport type { IPolarAxisHelper } from '../../component/axis/polar/interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { isContinuous } from '@visactor/vscale';\nimport { POLAR_DEFAULT_RADIUS } from '../../constant/polar';\nimport { BaseSeries } from '../base/base-series';\nimport type { IPolarSeriesSpec } from './interface';\nimport type { Datum, StringOrNumber } from '../../typings';\n\nexport abstract class PolarSeries<T extends IPolarSeriesSpec = IPolarSeriesSpec>\n extends BaseSeries<T>\n implements IPolarSeries\n{\n readonly coordinate: 'polar' = 'polar';\n\n protected _outerRadius: number = POLAR_DEFAULT_RADIUS;\n public get outerRadius() {\n return this._outerRadius;\n }\n\n protected _innerRadius: number = 0;\n public get innerRadius() {\n return this._innerRadius;\n }\n\n protected _angleField: string[] = [];\n getAngleField() {\n return this._angleField;\n }\n setAngleField(f: string | string[]): string[] {\n this._angleField = isValid(f) ? array(f) : [];\n return this._angleField;\n }\n\n protected _radiusField: string[] = [];\n getRadiusField() {\n return this._radiusField;\n }\n setRadiusField(f: string | string[]): string[] {\n this._radiusField = isValid(f) ? array(f) : [];\n return this._radiusField;\n }\n\n protected _innerRadiusField!: string[];\n public get innerRadiusField() {\n return this._innerRadiusField;\n }\n setInnerRadiusField(f: string | string[]): string[] {\n this._innerRadiusField = array(f);\n return this._innerRadiusField;\n }\n\n protected _radiusScale!: IBaseScale;\n public get radiusScale() {\n return this._radiusScale;\n }\n setRadiusScale(s: IBaseScale) {\n this._radiusScale = s;\n return s;\n }\n\n protected _angleScale!: IBaseScale;\n public get angleScale() {\n return this._angleScale;\n }\n setAngleScale(s: IBaseScale) {\n this._angleScale = s;\n return s;\n }\n\n private _angleAxisHelper!: IPolarAxisHelper;\n public get angleAxisHelper() {\n return this._angleAxisHelper;\n }\n public set angleAxisHelper(h: IPolarAxisHelper) {\n this._angleAxisHelper = h;\n this.onAngleAxisHelperUpdate();\n }\n\n private _radiusAxisHelper!: IPolarAxisHelper;\n public get radiusAxisHelper() {\n return this._radiusAxisHelper;\n }\n public set radiusAxisHelper(h: IPolarAxisHelper) {\n this._radiusAxisHelper = h;\n this.onRadiusAxisHelperUpdate();\n }\n\n protected _buildMarkAttributeContext() {\n super._buildMarkAttributeContext();\n // position\n this._markAttributeContext.valueToPosition = this.valueToPosition.bind(this);\n }\n\n valueToPosition(angleValue: StringOrNumber | StringOrNumber[], radiusValue: StringOrNumber | StringOrNumber[]) {\n if (isNil(angleValue) || isNil(radiusValue) || !this.angleAxisHelper || !this.radiusAxisHelper) {\n return { x: Number.NaN, y: Number.NaN };\n }\n const angle = this.angleAxisHelper.dataToPosition(array(angleValue));\n const radius = this.radiusAxisHelper.dataToPosition(array(radiusValue));\n // FIXME: 由于存在两个轴,这里的 坐标系转换逻辑会有点尬\n return this.angleAxisHelper.coordToPoint({ angle, radius });\n }\n\n dataToPosition(datum: Datum): IPoint {\n if (!datum || !this.angleAxisHelper || !this.radiusAxisHelper) {\n return { x: Number.NaN, y: Number.NaN };\n }\n // FIXME: 由于存在两个轴,这里的 坐标系转换逻辑会有点尬\n return this.valueToPosition(\n this.getDatumPositionValues(datum, this._angleField),\n this.getDatumPositionValues(datum, this._radiusField)\n );\n }\n\n dataToPositionX(datum: Datum): number {\n return this.dataToPosition(datum).x;\n }\n\n dataToPositionY(datum: Datum): number {\n return this.dataToPosition(datum).y;\n }\n\n dataToPositionZ(datum: Datum): number {\n return 0;\n }\n\n // todo: 待实现\n positionToData(p: IPolarPoint): any {\n /* do nothing */\n }\n radiusToData(r: number): any {\n /* do nothing */\n }\n angleToData(a: number): any {\n /* do nothing */\n }\n\n getStatisticFields() {\n const fields: { key: string; operations: Array<'max' | 'min' | 'values'> }[] = [];\n if (this.radiusAxisHelper?.getScale) {\n this._radiusField.forEach(f => {\n const result: { key: string; operations: Array<'max' | 'min' | 'values'> } = { key: f, operations: [] };\n if (isContinuous(this.radiusAxisHelper.getScale(0).type)) {\n result.operations = ['max', 'min'];\n } else {\n result.operations = ['values'];\n }\n fields.push(result);\n });\n }\n if (this.angleAxisHelper?.getScale) {\n this._angleField.forEach(f => {\n const result: { key: string; operations: Array<'max' | 'min' | 'values'> } = { key: f, operations: [] };\n if (isContinuous(this.angleAxisHelper.getScale(0).type)) {\n result.operations = ['max', 'min'];\n } else {\n result.operations = ['values'];\n }\n fields.push(result);\n });\n }\n return fields;\n }\n\n protected _getDefaultSpecFromChart(chartSpec: any) {\n const { outerRadius, innerRadius } = chartSpec;\n return { outerRadius, innerRadius } as Partial<T>;\n }\n\n setAttrFromSpec() {\n super.setAttrFromSpec();\n if (isValid(this._spec.outerRadius)) {\n this._outerRadius = this._spec.outerRadius;\n }\n if (isValid(this._spec.radius)) {\n // 优先使用outerRadius, 但要兼容spec.radius\n this._outerRadius = this._spec.radius;\n }\n if (isValid(this._spec.innerRadius)) {\n this._innerRadius = this._spec.innerRadius;\n }\n }\n\n updateSpec(spec: any) {\n const originalSpec = this._originalSpec;\n const { angleField, radiusField } = originalSpec;\n const result = super.updateSpec(spec);\n if (!shallowCompare(spec.angleField, angleField) || !shallowCompare(spec.radiusField, radiusField)) {\n result.change = true;\n result.reRender = true;\n result.reMake = true;\n }\n return result;\n }\n\n onRadiusAxisHelperUpdate(): void {\n this.onMarkPositionUpdate();\n }\n onAngleAxisHelperUpdate(): void {\n this.onMarkPositionUpdate();\n }\n\n afterInitMark(): void {\n super.afterInitMark();\n this._trigger.setStateKeys([...this._angleField, ...this._radiusField]);\n }\n\n protected _computeLayoutRadius() {\n const { width, height } = this._region.getLayoutRect();\n return Math.min(width / 2, height / 2);\n }\n\n setValueFieldToStackOffsetSilhouette(): void {\n // do nothing\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/series/polar/polar.ts"],"names":[],"mappings":";;;AAGA,qCAAmE;AAGnE,6CAAgD;AAChD,gDAA4D;AAC5D,qDAAiD;AAIjD,MAAsB,WACpB,SAAQ,wBAAa;IADvB;;QAIW,eAAU,GAAY,OAAO,CAAC;QAE7B,iBAAY,GAAW,4BAAoB,CAAC;QAK5C,iBAAY,GAAW,CAAC,CAAC;QAKzB,gBAAW,GAAa,EAAE,CAAC;QAS3B,iBAAY,GAAa,EAAE,CAAC;IAyLxC,CAAC;IA3MC,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAGD,IAAW,WAAW;QACpB,OAAO,IAAI,CAAC,YAAY,CAAC;IAC3B,CAAC;IAGD,aAAa;QACX,OAAO,IAAI,CAAC,WAAW,CAAC;IAC1B,CAAC;IACD,aAAa,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AM,YAAY,GAAG,IAAI,CAAC,aAAa,CAAC;QACxC,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,YAAY,CAAC;QACjD,MAAM,MAAM,GAAG,KAAK,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;QACtC,IAAI,CAAC,IAAA,qBAAc,EAAC,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,IAAI,CAAC,IAAA,qBAAc,EAAC,IAAI,CAAC,WAAW,EAAE,WAAW,CAAC,EAAE;YAClG,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;YACrB,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC;YACvB,MAAM,CAAC,MAAM,GAAG,IAAI,CAAC;SACtB;QACD,OAAO,MAAM,CAAC;IAChB,CAAC;IAED,wBAAwB;QACtB,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC9B,CAAC;IACD,uBAAuB;QACrB,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC9B,CAAC;IAED,aAAa;QACX,KAAK,CAAC,aAAa,EAAE,CAAC;QACtB,IAAI,CAAC,QAAQ,CAAC,YAAY,CAAC,CAAC,GAAG,IAAI,CAAC,WAAW,EAAE,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC;IAC1E,CAAC;IAES,oBAAoB;QAC5B,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,EAAE,CAAC;QACvD,OAAO,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,CAAC;IACzC,CAAC;IAED,oCAAoC;IAEpC,CAAC;CACF;AAlND,kCAkNC","file":"polar.js","sourcesContent":["import type { IBaseScale } from '@visactor/vscale';\nimport type { IPoint, IPolarPoint } from '../../typings/coordinate';\nimport type { IPolarSeries } from '../interface';\nimport { array, shallowCompare, isValid, isNil } from '../../util';\nimport type { IPolarAxisHelper } from '../../component/axis/polar/interface';\n// eslint-disable-next-line no-duplicate-imports\nimport { isContinuous } from '@visactor/vscale';\nimport { POLAR_DEFAULT_RADIUS } from '../../constant/polar';\nimport { BaseSeries } from '../base/base-series';\nimport type { IPolarSeriesSpec } from './interface';\nimport type { Datum, StringOrNumber } from '../../typings';\n\nexport abstract class PolarSeries<T extends IPolarSeriesSpec = IPolarSeriesSpec>\n extends BaseSeries<T>\n implements IPolarSeries\n{\n readonly coordinate: 'polar' = 'polar';\n\n protected _outerRadius: number = POLAR_DEFAULT_RADIUS;\n public get outerRadius() {\n return this._outerRadius;\n }\n\n protected _innerRadius: number = 0;\n public get innerRadius() {\n return this._innerRadius;\n }\n\n protected _angleField: string[] = [];\n getAngleField() {\n return this._angleField;\n }\n setAngleField(f: string | string[]): string[] {\n this._angleField = isValid(f) ? array(f) : [];\n return this._angleField;\n }\n\n protected _radiusField: string[] = [];\n getRadiusField() {\n return this._radiusField;\n }\n setRadiusField(f: string | string[]): string[] {\n this._radiusField = isValid(f) ? array(f) : [];\n return this._radiusField;\n }\n\n protected _innerRadiusField!: string[];\n public get innerRadiusField() {\n return this._innerRadiusField;\n }\n setInnerRadiusField(f: string | string[]): string[] {\n this._innerRadiusField = array(f);\n return this._innerRadiusField;\n }\n\n protected _radiusScale!: IBaseScale;\n public get radiusScale() {\n return this._radiusScale;\n }\n setRadiusScale(s: IBaseScale) {\n this._radiusScale = s;\n return s;\n }\n\n protected _angleScale!: IBaseScale;\n public get angleScale() {\n return this._angleScale;\n }\n setAngleScale(s: IBaseScale) {\n this._angleScale = s;\n return s;\n }\n\n private _angleAxisHelper!: IPolarAxisHelper;\n public get angleAxisHelper() {\n return this._angleAxisHelper;\n }\n public set angleAxisHelper(h: IPolarAxisHelper) {\n this._angleAxisHelper = h;\n this.onAngleAxisHelperUpdate();\n }\n\n private _radiusAxisHelper!: IPolarAxisHelper;\n public get radiusAxisHelper() {\n return this._radiusAxisHelper;\n }\n public set radiusAxisHelper(h: IPolarAxisHelper) {\n this._radiusAxisHelper = h;\n this.onRadiusAxisHelperUpdate();\n }\n\n protected _buildMarkAttributeContext() {\n super._buildMarkAttributeContext();\n // position\n this._markAttributeContext.valueToPosition = this.valueToPosition.bind(this);\n this._markAttributeContext.getCenter = () => {\n return this.angleAxisHelper.center();\n };\n }\n\n valueToPosition(angleValue: StringOrNumber | StringOrNumber[], radiusValue: StringOrNumber | StringOrNumber[]) {\n if (isNil(angleValue) || isNil(radiusValue) || !this.angleAxisHelper || !this.radiusAxisHelper) {\n return { x: Number.NaN, y: Number.NaN };\n }\n const angle = this.angleAxisHelper.dataToPosition(array(angleValue));\n const radius = this.radiusAxisHelper.dataToPosition(array(radiusValue));\n // FIXME: 由于存在两个轴,这里的 坐标系转换逻辑会有点尬\n return this.angleAxisHelper.coordToPoint({ angle, radius });\n }\n\n dataToPosition(datum: Datum): IPoint {\n if (!datum || !this.angleAxisHelper || !this.radiusAxisHelper) {\n return { x: Number.NaN, y: Number.NaN };\n }\n // FIXME: 由于存在两个轴,这里的 坐标系转换逻辑会有点尬\n return this.valueToPosition(\n this.getDatumPositionValues(datum, this._angleField),\n this.getDatumPositionValues(datum, this._radiusField)\n );\n }\n\n dataToPositionX(datum: Datum): number {\n return this.dataToPosition(datum).x;\n }\n\n dataToPositionY(datum: Datum): number {\n return this.dataToPosition(datum).y;\n }\n\n dataToPositionZ(datum: Datum): number {\n return 0;\n }\n\n // todo: 待实现\n positionToData(p: IPolarPoint): any {\n /* do nothing */\n }\n radiusToData(r: number): any {\n /* do nothing */\n }\n angleToData(a: number): any {\n /* do nothing */\n }\n\n getStatisticFields() {\n const fields: { key: string; operations: Array<'max' | 'min' | 'values'> }[] = [];\n if (this.radiusAxisHelper?.getScale) {\n this._radiusField.forEach(f => {\n const result: { key: string; operations: Array<'max' | 'min' | 'values'> } = { key: f, operations: [] };\n if (isContinuous(this.radiusAxisHelper.getScale(0).type)) {\n result.operations = ['max', 'min'];\n } else {\n result.operations = ['values'];\n }\n fields.push(result);\n });\n }\n if (this.angleAxisHelper?.getScale) {\n this._angleField.forEach(f => {\n const result: { key: string; operations: Array<'max' | 'min' | 'values'> } = { key: f, operations: [] };\n if (isContinuous(this.angleAxisHelper.getScale(0).type)) {\n result.operations = ['max', 'min'];\n } else {\n result.operations = ['values'];\n }\n fields.push(result);\n });\n }\n return fields;\n }\n\n protected _getDefaultSpecFromChart(chartSpec: any) {\n const { outerRadius, innerRadius } = chartSpec;\n return { outerRadius, innerRadius } as Partial<T>;\n }\n\n setAttrFromSpec() {\n super.setAttrFromSpec();\n if (isValid(this._spec.outerRadius)) {\n this._outerRadius = this._spec.outerRadius;\n }\n if (isValid(this._spec.radius)) {\n // 优先使用outerRadius, 但要兼容spec.radius\n this._outerRadius = this._spec.radius;\n }\n if (isValid(this._spec.innerRadius)) {\n this._innerRadius = this._spec.innerRadius;\n }\n }\n\n updateSpec(spec: any) {\n const originalSpec = this._originalSpec;\n const { angleField, radiusField } = originalSpec;\n const result = super.updateSpec(spec);\n if (!shallowCompare(spec.angleField, angleField) || !shallowCompare(spec.radiusField, radiusField)) {\n result.change = true;\n result.reRender = true;\n result.reMake = true;\n }\n return result;\n }\n\n onRadiusAxisHelperUpdate(): void {\n this.onMarkPositionUpdate();\n }\n onAngleAxisHelperUpdate(): void {\n this.onMarkPositionUpdate();\n }\n\n afterInitMark(): void {\n super.afterInitMark();\n this._trigger.setStateKeys([...this._angleField, ...this._radiusField]);\n }\n\n protected _computeLayoutRadius() {\n const { width, height } = this._region.getLayoutRect();\n return Math.min(width / 2, height / 2);\n }\n\n setValueFieldToStackOffsetSilhouette(): void {\n // do nothing\n }\n}\n"]}
@@ -13,6 +13,7 @@ export interface IRadarSeriesSpec extends IRoseLikeSeriesSpec, IAnimationSpec<Ra
13
13
  [SeriesMarkNameEnum.line]?: IMarkSpec<ILineMarkSpec>;
14
14
  [SeriesMarkNameEnum.area]?: IMarkSpec<IAreaMarkSpec>;
15
15
  seriesMark?: 'point' | 'line' | 'area';
16
+ activePoint?: boolean;
16
17
  }
17
18
  export interface IRadarSeriesTheme extends IRoseLikeSeriesTheme, ILineLikeSeriesTheme {
18
19
  [SeriesMarkNameEnum.area]?: Partial<IMarkTheme<IAreaMarkSpec>>;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/series/radar/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { IAnimationSpec } from '../../animation/spec';\nimport type { IMarkProgressiveConfig } from '../../mark/interface';\nimport type { IMarkSpec, IMarkTheme } from '../../typings/spec/common';\nimport type { IAreaMarkSpec, ILineMarkSpec, ISymbolMarkSpec } from '../../typings/visual';\nimport type { SeriesMarkNameEnum } from '../interface';\nimport type { ILineLikeSeriesTheme } from '../mixin/line-mixin';\nimport type { IRoseLikeSeriesSpec, IRoseLikeSeriesTheme } from '../polar/rose-like';\nimport type { RadarAppearPreset } from './animation';\n\ntype RadarMarks = 'point' | 'line' | 'area';\n\nexport interface IRadarSeriesSpec\n extends IRoseLikeSeriesSpec,\n IAnimationSpec<RadarMarks, RadarAppearPreset>,\n IMarkProgressiveConfig {\n type: 'radar';\n\n /**\n * 点图元配置\n */\n [SeriesMarkNameEnum.point]?: IMarkSpec<ISymbolMarkSpec>;\n /**\n * 线图元配置\n */\n [SeriesMarkNameEnum.line]?: IMarkSpec<ILineMarkSpec>;\n /**\n * 面积图元配置\n */\n [SeriesMarkNameEnum.area]?: IMarkSpec<IAreaMarkSpec>;\n /**\n * 系列主 mark 类型配置,该配置会影响图例的展示\n * @default 'area'\n * @since 1.2.0\n */\n seriesMark?: 'point' | 'line' | 'area';\n}\n\nexport interface IRadarSeriesTheme extends IRoseLikeSeriesTheme, ILineLikeSeriesTheme {\n [SeriesMarkNameEnum.area]?: Partial<IMarkTheme<IAreaMarkSpec>>;\n}\n"]}
1
+ {"version":3,"sources":["../src/series/radar/interface.ts"],"names":[],"mappings":"","file":"interface.js","sourcesContent":["import type { IAnimationSpec } from '../../animation/spec';\nimport type { IMarkProgressiveConfig } from '../../mark/interface';\nimport type { IMarkSpec, IMarkTheme } from '../../typings/spec/common';\nimport type { IAreaMarkSpec, ILineMarkSpec, ISymbolMarkSpec } from '../../typings/visual';\nimport type { SeriesMarkNameEnum } from '../interface';\nimport type { ILineLikeSeriesTheme } from '../mixin/line-mixin';\nimport type { IRoseLikeSeriesSpec, IRoseLikeSeriesTheme } from '../polar/rose-like';\nimport type { RadarAppearPreset } from './animation';\n\ntype RadarMarks = 'point' | 'line' | 'area';\n\nexport interface IRadarSeriesSpec\n extends IRoseLikeSeriesSpec,\n IAnimationSpec<RadarMarks, RadarAppearPreset>,\n IMarkProgressiveConfig {\n type: 'radar';\n\n /**\n * 点图元配置\n */\n [SeriesMarkNameEnum.point]?: IMarkSpec<ISymbolMarkSpec>;\n /**\n * 线图元配置\n */\n [SeriesMarkNameEnum.line]?: IMarkSpec<ILineMarkSpec>;\n /**\n * 面积图元配置\n */\n [SeriesMarkNameEnum.area]?: IMarkSpec<IAreaMarkSpec>;\n /**\n * 系列主 mark 类型配置,该配置会影响图例的展示\n * @default 'area'\n * @since 1.2.0\n */\n seriesMark?: 'point' | 'line' | 'area';\n\n /**\n * 是否使用额外的 activePoint 显示交互点,可以在点隐藏时显示被交互的点\n * @default false\n * @since 1.3.0\n */\n activePoint?: boolean;\n}\n\nexport interface IRadarSeriesTheme extends IRoseLikeSeriesTheme, ILineLikeSeriesTheme {\n [SeriesMarkNameEnum.area]?: Partial<IMarkTheme<IAreaMarkSpec>>;\n}\n"]}
@@ -0,0 +1,10 @@
1
+ import type { ITooltipTextTheme } from '../../component/tooltip/interface/theme';
2
+ import type { TooltipContentProperty } from './common';
3
+ export interface ITooltipLabelPattern {
4
+ keyStyle?: TooltipContentProperty<ITooltipTextTheme>;
5
+ valueStyle?: TooltipContentProperty<ITooltipTextTheme>;
6
+ }
7
+ export interface ITooltipLabelActual {
8
+ keyStyle?: ITooltipTextTheme;
9
+ valueStyle?: ITooltipTextTheme;
10
+ }
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: !0
5
+ });
6
+ //# sourceMappingURL=label.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/typings/tooltip/label.ts"],"names":[],"mappings":"","file":"label.js","sourcesContent":["import type { ITooltipTextTheme } from '../../component/tooltip/interface/theme';\nimport type { TooltipContentProperty } from './common';\n\nexport interface ITooltipLabelPattern {\n /** key 样式(只在 content 上需要配置) */\n keyStyle?: TooltipContentProperty<ITooltipTextTheme>;\n /** value 样式 */\n valueStyle?: TooltipContentProperty<ITooltipTextTheme>;\n}\n\nexport interface ITooltipLabelActual {\n keyStyle?: ITooltipTextTheme;\n valueStyle?: ITooltipTextTheme;\n}\n"]}
@@ -1,13 +1,13 @@
1
1
  import type { TooltipContentProperty } from './common';
2
+ import type { ITooltipLabelActual, ITooltipLabelPattern } from './label';
2
3
  import type { ITooltipShapeActual, ITooltipShapePattern } from './shape';
3
- export interface IToolTipLinePattern extends ITooltipShapePattern {
4
- seriesId?: number;
4
+ export interface IToolTipLinePattern extends ITooltipShapePattern, ITooltipLabelPattern {
5
5
  key?: TooltipContentProperty<string>;
6
6
  value?: TooltipContentProperty<string>;
7
7
  visible?: TooltipContentProperty<boolean>;
8
8
  isKeyAdaptive?: TooltipContentProperty<boolean>;
9
9
  }
10
- export interface IToolTipLineActual extends ITooltipShapeActual {
10
+ export interface IToolTipLineActual extends ITooltipShapeActual, ITooltipLabelActual {
11
11
  key?: string;
12
12
  value?: string;
13
13
  visible?: boolean;
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/typings/tooltip/line.ts"],"names":[],"mappings":"","file":"line.js","sourcesContent":["import type { TooltipContentProperty } from './common';\nimport type { ITooltipShapeActual, ITooltipShapePattern } from './shape';\n\nexport interface IToolTipLinePattern extends ITooltipShapePattern {\n /** 该 pattern 属于哪个系列id(用户不需要设置) */\n seriesId?: number;\n /** tooltip key 值内容 */\n key?: TooltipContentProperty<string>;\n /** tooltip value 值内容 */\n value?: TooltipContentProperty<string>;\n /** 该行是否可见 */\n visible?: TooltipContentProperty<boolean>;\n /** key 列是否适应内容 */\n isKeyAdaptive?: TooltipContentProperty<boolean>;\n}\n\nexport interface IToolTipLineActual extends ITooltipShapeActual {\n /** tooltip key 值内容 */\n key?: string;\n /** tooltip value 值内容 */\n value?: string;\n /** 该行是否可见 */\n visible?: boolean;\n /** key 列是否适应内容 */\n isKeyAdaptive?: boolean;\n}\n"]}
1
+ {"version":3,"sources":["../src/typings/tooltip/line.ts"],"names":[],"mappings":"","file":"line.js","sourcesContent":["import type { TooltipContentProperty } from './common';\nimport type { ITooltipLabelActual, ITooltipLabelPattern } from './label';\nimport type { ITooltipShapeActual, ITooltipShapePattern } from './shape';\n\nexport interface IToolTipLinePattern extends ITooltipShapePattern, ITooltipLabelPattern {\n /** tooltip key 值内容 */\n key?: TooltipContentProperty<string>;\n /** tooltip value 值内容 */\n value?: TooltipContentProperty<string>;\n /** 该行是否可见 */\n visible?: TooltipContentProperty<boolean>;\n /** key 列是否适应内容 */\n isKeyAdaptive?: TooltipContentProperty<boolean>;\n}\n\nexport interface IToolTipLineActual extends ITooltipShapeActual, ITooltipLabelActual {\n /** tooltip key 值内容 */\n key?: string;\n /** tooltip value 值内容 */\n value?: string;\n /** 该行是否可见 */\n visible?: boolean;\n /** key 列是否适应内容 */\n isKeyAdaptive?: boolean;\n}\n"]}
@@ -1,14 +1,17 @@
1
1
  import type { ShapeType } from '../shape';
2
2
  import type { TooltipContentProperty } from './common';
3
3
  export interface ITooltipShapePattern {
4
+ seriesId?: number;
4
5
  hasShape?: boolean;
5
6
  shapeType?: TooltipContentProperty<ShapeType>;
6
7
  shapeColor?: TooltipContentProperty<string>;
7
8
  shapeHollow?: boolean;
9
+ shapeSize?: TooltipContentProperty<number>;
8
10
  }
9
11
  export interface ITooltipShapeActual {
10
12
  hasShape?: boolean;
11
13
  shapeType?: ShapeType;
12
14
  shapeColor?: string;
13
15
  shapeHollow?: boolean;
16
+ shapeSize?: number;
14
17
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/typings/tooltip/shape.ts"],"names":[],"mappings":"","file":"shape.js","sourcesContent":["import type { ShapeType } from '../shape';\nimport type { TooltipContentProperty } from './common';\n\nexport interface ITooltipShapePattern {\n hasShape?: boolean;\n shapeType?: TooltipContentProperty<ShapeType>;\n shapeColor?: TooltipContentProperty<string>;\n shapeHollow?: boolean;\n}\n\nexport interface ITooltipShapeActual {\n hasShape?: boolean;\n shapeType?: ShapeType;\n shapeColor?: string;\n shapeHollow?: boolean;\n}\n"]}
1
+ {"version":3,"sources":["../src/typings/tooltip/shape.ts"],"names":[],"mappings":"","file":"shape.js","sourcesContent":["import type { ShapeType } from '../shape';\nimport type { TooltipContentProperty } from './common';\n\nexport interface ITooltipShapePattern {\n /** 该 pattern 属于哪个系列id(用户不需要设置) */\n seriesId?: number;\n hasShape?: boolean;\n shapeType?: TooltipContentProperty<ShapeType>;\n shapeColor?: TooltipContentProperty<string>;\n shapeHollow?: boolean;\n shapeSize?: TooltipContentProperty<number>;\n}\n\nexport interface ITooltipShapeActual {\n hasShape?: boolean;\n shapeType?: ShapeType;\n shapeColor?: string;\n shapeHollow?: boolean;\n shapeSize?: number;\n}\n"]}
@@ -23,7 +23,8 @@ export class AreaChart extends CartesianChart {
23
23
  point: spec.point,
24
24
  line: spec.line,
25
25
  area: spec.area,
26
- seriesMark: null !== (_a = spec.seriesMark) && void 0 !== _a ? _a : "area"
26
+ seriesMark: null !== (_a = spec.seriesMark) && void 0 !== _a ? _a : "area",
27
+ activePoint: spec.activePoint
27
28
  });
28
29
  }
29
30
  transformSpec(spec) {
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/chart/area/area.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,oCAAoC,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;AAE/B,MAAM,OAAO,SAAU,SAAQ,cAAc;IAA7C;;QAGW,SAAI,GAAW,aAAa,CAAC,IAAI,CAAC;QAClC,eAAU,GAAW,cAAc,CAAC,IAAI,CAAC;IAiBpD,CAAC;IAfW,qBAAqB,CAAC,IAAoB;;QAClD,uCACK,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,KACpC,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,OAAO,EACxC,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,UAAU,EAAE,MAAA,IAAI,CAAC,UAAU,mCAAI,MAAM,IACrC;IACJ,CAAC;IAED,aAAa,CAAC,IAAS;QACrB,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC1B,oCAAoC,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;;AAnBe,cAAI,GAAW,aAAa,CAAC,IAAI,CAAC;AAClC,cAAI,GAAW,eAAe,CAAC","file":"area.js","sourcesContent":["import { SeriesTypeEnum } from '../../series/interface';\nimport { CartesianChart } from '../cartesian/cartesian';\nimport { ChartTypeEnum } from '../interface';\nimport type { IAreaChartSpec } from './interface';\nimport { setDefaultCrosshairForCartesianChart } from '../util';\nimport { VChart } from '../../core/vchart';\nimport { AreaSeries } from '../../series';\nVChart.useSeries([AreaSeries]);\n\nexport class AreaChart extends CartesianChart {\n static readonly type: string = ChartTypeEnum.area;\n static readonly view: string = 'singleDefault';\n readonly type: string = ChartTypeEnum.area;\n readonly seriesType: string = SeriesTypeEnum.area;\n\n protected _getDefaultSeriesSpec(spec: IAreaChartSpec): any {\n return {\n ...super._getDefaultSeriesSpec(spec),\n invalidType: spec.invalidType || 'break',\n point: spec.point,\n line: spec.line,\n area: spec.area,\n seriesMark: spec.seriesMark ?? 'area'\n };\n }\n\n transformSpec(spec: any): void {\n super.transformSpec(spec);\n setDefaultCrosshairForCartesianChart(spec);\n }\n}\n"]}
1
+ {"version":3,"sources":["../src/chart/area/area.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,OAAO,EAAE,oCAAoC,EAAE,MAAM,SAAS,CAAC;AAC/D,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,MAAM,CAAC,SAAS,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC;AAE/B,MAAM,OAAO,SAAU,SAAQ,cAAc;IAA7C;;QAGW,SAAI,GAAW,aAAa,CAAC,IAAI,CAAC;QAClC,eAAU,GAAW,cAAc,CAAC,IAAI,CAAC;IAkBpD,CAAC;IAhBW,qBAAqB,CAAC,IAAoB;;QAClD,uCACK,KAAK,CAAC,qBAAqB,CAAC,IAAI,CAAC,KACpC,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,OAAO,EACxC,KAAK,EAAE,IAAI,CAAC,KAAK,EACjB,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,IAAI,EAAE,IAAI,CAAC,IAAI,EACf,UAAU,EAAE,MAAA,IAAI,CAAC,UAAU,mCAAI,MAAM,EACrC,WAAW,EAAE,IAAI,CAAC,WAAW,IAC7B;IACJ,CAAC;IAED,aAAa,CAAC,IAAS;QACrB,KAAK,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;QAC1B,oCAAoC,CAAC,IAAI,CAAC,CAAC;IAC7C,CAAC;;AApBe,cAAI,GAAW,aAAa,CAAC,IAAI,CAAC;AAClC,cAAI,GAAW,eAAe,CAAC","file":"area.js","sourcesContent":["import { SeriesTypeEnum } from '../../series/interface';\nimport { CartesianChart } from '../cartesian/cartesian';\nimport { ChartTypeEnum } from '../interface';\nimport type { IAreaChartSpec } from './interface';\nimport { setDefaultCrosshairForCartesianChart } from '../util';\nimport { VChart } from '../../core/vchart';\nimport { AreaSeries } from '../../series';\nVChart.useSeries([AreaSeries]);\n\nexport class AreaChart extends CartesianChart {\n static readonly type: string = ChartTypeEnum.area;\n static readonly view: string = 'singleDefault';\n readonly type: string = ChartTypeEnum.area;\n readonly seriesType: string = SeriesTypeEnum.area;\n\n protected _getDefaultSeriesSpec(spec: IAreaChartSpec): any {\n return {\n ...super._getDefaultSeriesSpec(spec),\n invalidType: spec.invalidType || 'break',\n point: spec.point,\n line: spec.line,\n area: spec.area,\n seriesMark: spec.seriesMark ?? 'area',\n activePoint: spec.activePoint\n };\n }\n\n transformSpec(spec: any): void {\n super.transformSpec(spec);\n setDefaultCrosshairForCartesianChart(spec);\n }\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type { ISeriesSpec, Datum, IMarkStateSpec, IRegionQuerier, MaybeArray, IPadding, IRect, StringOrNumber, IChartSpec } from '../typings';
1
+ import type { ISeriesSpec, Datum, IMarkStateSpec, IRegionQuerier, MaybeArray, IPadding, IRect, StringOrNumber, IChartSpec, IDataValues } from '../typings';
2
2
  import type { LayoutCallBack } from '../layout/interface';
3
3
  import type { ILayoutModelState, ILayoutOrientPadding, ILayoutRect, IModel, IModelOption, IUpdateSpecResult } from '../model/interface';
4
4
  import type { IChart, IChartLayoutOption, IChartRenderOption, IChartOption, IChartEvaluateOption, ILayoutParams, DimensionIndexOption } from './interface';
@@ -96,6 +96,7 @@ export declare class BaseChart extends CompilableBase implements IChart {
96
96
  getMarkById(id: number): IMark | undefined;
97
97
  updateParseData(id: string, data: Datum[], options?: IParserOptions): void;
98
98
  updateData(id: StringOrNumber, data: unknown, updateGlobalScale?: boolean, options?: IParserOptions): void;
99
+ updateFullData(data: IDataValues | IDataValues[], updateGlobalScale?: boolean): void;
99
100
  onRender(option: IChartRenderOption): void;
100
101
  getCanvasRect(): Omit<IRect, 'x' | 'y'>;
101
102
  getSeriesData(id: StringOrNumber | undefined, index: number | undefined): DataView | undefined;
@@ -333,6 +333,18 @@ export class BaseChart extends CompilableBase {
333
333
  dv && dv.parseNewData(data, options), updateGlobalScale && this.updateGlobalScaleDomain(),
334
334
  this.getAllModels().forEach((model => model.onDataUpdate()));
335
335
  }
336
+ updateFullData(data, updateGlobalScale = !0) {
337
+ const dvs = [];
338
+ array(data).forEach((d => {
339
+ const dv = this._dataSet.getDataView(d.id);
340
+ dv && (dvs.push({
341
+ d: d,
342
+ dv: dv
343
+ }), dv.markRunning());
344
+ })), dvs.forEach((({d: d, dv: dv}) => {
345
+ dv.setFields(d.fields), dv.parseNewData(d.values, d.parser);
346
+ })), updateGlobalScale && this.updateGlobalScaleDomain(), this.getAllModels().forEach((model => model.onDataUpdate()));
347
+ }
336
348
  onRender(option) {}
337
349
  getCanvasRect() {
338
350
  if (this._canvasRect) return this._canvasRect;