@visactor/vchart 2.1.0-alpha.9 → 2.1.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.
- package/build/es5/index.js +3 -3
- package/build/index.es.js +49550 -52388
- package/build/index.js +49552 -52390
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/callback-disappear.d.ts +1 -1
- package/cjs/animation/callback-disappear.js +2 -2
- package/cjs/animation/callback-disappear.js.map +1 -1
- package/cjs/animation/config.js +34 -34
- package/cjs/animation/config.js.map +1 -1
- package/cjs/animation/grammar-dector.js +1 -2
- package/cjs/animation/index.js +2 -1
- package/cjs/chart/base/base-chart.d.ts +2 -0
- package/cjs/chart/base/base-chart.js +14 -5
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/compile/compiler.js +8 -3
- package/cjs/compile/compiler.js.map +1 -1
- package/cjs/compile/interface/compiler.js.map +1 -1
- package/cjs/compile/morph.js +4 -4
- package/cjs/compile/morph.js.map +1 -1
- package/cjs/compile/stage-app.d.ts +10 -2
- package/cjs/compile/stage-app.js +69 -26
- package/cjs/compile/stage-app.js.map +1 -1
- package/cjs/compile/util.js +1 -2
- package/cjs/component/axis/base-axis.d.ts +1 -1
- package/cjs/component/axis/base-axis.js +3 -3
- package/cjs/component/axis/base-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/band-axis.js +4 -4
- package/cjs/component/axis/cartesian/band-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/linear-axis.d.ts +3 -2
- package/cjs/component/axis/cartesian/linear-axis.js +8 -4
- package/cjs/component/axis/cartesian/linear-axis.js.map +1 -1
- package/cjs/component/axis/mixin/linear-axis-mixin.d.ts +2 -0
- package/cjs/component/axis/mixin/linear-axis-mixin.js +7 -1
- package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
- package/cjs/component/brush/brush.d.ts +1 -0
- package/cjs/component/brush/brush.js +15 -10
- package/cjs/component/brush/brush.js.map +1 -1
- package/cjs/component/crosshair/base.d.ts +1 -1
- package/cjs/component/crosshair/base.js +3 -3
- package/cjs/component/crosshair/base.js.map +1 -1
- package/cjs/component/crosshair/cartesian.js +3 -3
- package/cjs/component/crosshair/cartesian.js.map +1 -1
- package/cjs/component/index.js +2 -1
- package/cjs/component/label/label.js +2 -2
- package/cjs/component/label/label.js.map +1 -1
- package/cjs/component/legend/base-legend.js +1 -1
- package/cjs/component/legend/base-legend.js.map +1 -1
- package/cjs/component/legend/discrete/interface.d.ts +11 -1
- package/cjs/component/legend/discrete/interface.js.map +1 -1
- package/cjs/component/legend/discrete/legend.d.ts +1 -1
- package/cjs/component/legend/discrete/legend.js +9 -8
- package/cjs/component/legend/discrete/legend.js.map +1 -1
- package/cjs/component/legend/discrete/util.d.ts +2 -1
- package/cjs/component/legend/discrete/util.js +39 -5
- package/cjs/component/legend/discrete/util.js.map +1 -1
- package/cjs/component/marker/base-marker.js +11 -7
- package/cjs/component/marker/base-marker.js.map +1 -1
- package/cjs/component/marker/mark-line/cartesian-mark-line.js +18 -7
- package/cjs/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/cjs/component/marker/mark-line/interface/spec.d.ts +9 -2
- package/cjs/component/marker/mark-line/interface/spec.js.map +1 -1
- package/cjs/component/marker/mark-point/base-mark-point.js +30 -17
- package/cjs/component/marker/mark-point/base-mark-point.js.map +1 -1
- package/cjs/component/marker/utils.js +17 -7
- package/cjs/component/marker/utils.js.map +1 -1
- package/cjs/constant/correlation.js +2 -1
- package/cjs/constant/event.js +1 -2
- package/cjs/constant/marker.js +1 -1
- package/cjs/constant/polar.js +1 -1
- package/cjs/core/index.d.ts +3 -2
- package/cjs/core/index.js +9 -5
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/vchart.js +16 -6
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/data/data-view-utils.js +1 -1
- package/cjs/data/initialize.js +1 -1
- package/cjs/data/register.js +1 -1
- package/cjs/env/env.js +10 -10
- package/cjs/env/env.js.map +1 -1
- package/cjs/mark/arc.js +4 -4
- package/cjs/mark/arc.js.map +1 -1
- package/cjs/mark/area.js +4 -5
- package/cjs/mark/area.js.map +1 -1
- package/cjs/mark/base/base-line.js +2 -2
- package/cjs/mark/base/base-line.js.map +1 -1
- package/cjs/mark/base/base-mark.d.ts +0 -1
- package/cjs/mark/base/base-mark.js +16 -24
- package/cjs/mark/base/base-mark.js.map +1 -1
- package/cjs/mark/glyph.d.ts +3 -0
- package/cjs/mark/glyph.js +29 -5
- package/cjs/mark/glyph.js.map +1 -1
- package/cjs/mark/group.js +5 -5
- package/cjs/mark/group.js.map +1 -1
- package/cjs/mark/interface/common.js.map +1 -1
- package/cjs/mark/line.js +4 -5
- package/cjs/mark/line.js.map +1 -1
- package/cjs/mark/rect.js +3 -3
- package/cjs/mark/rect.js.map +1 -1
- package/cjs/mark/symbol.js +3 -3
- package/cjs/mark/symbol.js.map +1 -1
- package/cjs/mark/text.js +4 -4
- package/cjs/mark/text.js.map +1 -1
- package/cjs/plugin/components/axis-sync/tick-align-transform.js +2 -2
- package/cjs/plugin/components/axis-sync/tick-align-transform.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/canvas-tooltip-handler.d.ts +2 -2
- package/cjs/plugin/components/tooltip-handler/canvas-tooltip-handler.js +2 -2
- package/cjs/plugin/components/tooltip-handler/canvas-tooltip-handler.js.map +1 -1
- package/cjs/plugin/other.js +5 -5
- package/cjs/plugin/other.js.map +1 -1
- package/cjs/series/base/base-series.d.ts +3 -0
- package/cjs/series/base/base-series.js +57 -27
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/dot/dot.d.ts +1 -0
- package/cjs/series/interface/common.d.ts +2 -1
- package/cjs/series/interface/common.js.map +1 -1
- package/cjs/series/line/line.js +3 -3
- package/cjs/series/line/line.js.map +1 -1
- package/cjs/series/waterfall/waterfall.d.ts +2 -0
- package/cjs/series/waterfall/waterfall.js +12 -4
- package/cjs/series/waterfall/waterfall.js.map +1 -1
- package/cjs/series/word-cloud/animation.js +3 -0
- package/cjs/series/word-cloud/animation.js.map +1 -1
- package/cjs/theme/builtin/common/series/word-cloud.js +2 -6
- package/cjs/theme/builtin/common/series/word-cloud.js.map +1 -1
- package/cjs/util/mark.js +7 -3
- package/cjs/util/mark.js.map +1 -1
- package/cjs/util/math.d.ts +1 -1
- package/cjs/util/math.js +2 -2
- package/cjs/util/math.js.map +1 -1
- package/cjs/util/style.js +24 -2
- package/cjs/util/style.js.map +1 -1
- package/cjs/util/text.js +2 -2
- package/cjs/util/text.js.map +1 -1
- package/cjs/vchart-line.d.ts +4 -0
- package/cjs/vchart-line.js +35 -0
- package/cjs/vchart-line.js.map +1 -0
- package/cjs/vchart-simple.d.ts +5 -1
- package/cjs/vchart-simple.js +11 -10
- package/cjs/vchart-simple.js.map +1 -1
- package/esm/animation/callback-disappear.d.ts +1 -1
- package/esm/animation/callback-disappear.js +1 -1
- package/esm/animation/callback-disappear.js.map +1 -1
- package/esm/animation/config.js +33 -1
- package/esm/animation/config.js.map +1 -1
- package/esm/animation/grammar-dector.js +1 -2
- package/esm/animation/index.js +2 -1
- package/esm/chart/base/base-chart.d.ts +2 -0
- package/esm/chart/base/base-chart.js +14 -5
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/compile/compiler.js +8 -4
- package/esm/compile/compiler.js.map +1 -1
- package/esm/compile/interface/compiler.js.map +1 -1
- package/esm/compile/morph.js +1 -1
- package/esm/compile/morph.js.map +1 -1
- package/esm/compile/stage-app.d.ts +10 -2
- package/esm/compile/stage-app.js +65 -23
- package/esm/compile/stage-app.js.map +1 -1
- package/esm/compile/util.js +1 -2
- package/esm/component/axis/base-axis.d.ts +1 -1
- package/esm/component/axis/base-axis.js +2 -2
- package/esm/component/axis/base-axis.js.map +1 -1
- package/esm/component/axis/cartesian/band-axis.js +4 -2
- package/esm/component/axis/cartesian/band-axis.js.map +1 -1
- package/esm/component/axis/cartesian/linear-axis.d.ts +3 -2
- package/esm/component/axis/cartesian/linear-axis.js +9 -1
- package/esm/component/axis/cartesian/linear-axis.js.map +1 -1
- package/esm/component/axis/mixin/linear-axis-mixin.d.ts +2 -0
- package/esm/component/axis/mixin/linear-axis-mixin.js +7 -1
- package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
- package/esm/component/brush/brush.d.ts +1 -0
- package/esm/component/brush/brush.js +16 -10
- package/esm/component/brush/brush.js.map +1 -1
- package/esm/component/crosshair/base.d.ts +1 -1
- package/esm/component/crosshair/base.js +1 -1
- package/esm/component/crosshair/base.js.map +1 -1
- package/esm/component/crosshair/cartesian.js +3 -1
- package/esm/component/crosshair/cartesian.js.map +1 -1
- package/esm/component/index.js +2 -1
- package/esm/component/label/label.js +1 -1
- package/esm/component/label/label.js.map +1 -1
- package/esm/component/legend/base-legend.js +1 -1
- package/esm/component/legend/base-legend.js.map +1 -1
- package/esm/component/legend/discrete/interface.d.ts +11 -1
- package/esm/component/legend/discrete/interface.js.map +1 -1
- package/esm/component/legend/discrete/legend.d.ts +1 -1
- package/esm/component/legend/discrete/legend.js +4 -3
- package/esm/component/legend/discrete/legend.js.map +1 -1
- package/esm/component/legend/discrete/util.d.ts +2 -1
- package/esm/component/legend/discrete/util.js +37 -4
- package/esm/component/legend/discrete/util.js.map +1 -1
- package/esm/component/marker/base-marker.js +11 -7
- package/esm/component/marker/base-marker.js.map +1 -1
- package/esm/component/marker/mark-line/cartesian-mark-line.js +18 -8
- package/esm/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/esm/component/marker/mark-line/interface/spec.d.ts +9 -2
- package/esm/component/marker/mark-line/interface/spec.js.map +1 -1
- package/esm/component/marker/mark-point/base-mark-point.js +29 -16
- package/esm/component/marker/mark-point/base-mark-point.js.map +1 -1
- package/esm/component/marker/utils.js +16 -6
- package/esm/component/marker/utils.js.map +1 -1
- package/esm/constant/correlation.js +2 -1
- package/esm/constant/event.js +1 -2
- package/esm/constant/marker.js +1 -1
- package/esm/constant/polar.js +1 -1
- package/esm/core/index.d.ts +3 -2
- package/esm/core/index.js +4 -2
- package/esm/core/index.js.map +1 -1
- package/esm/core/vchart.js +15 -5
- package/esm/core/vchart.js.map +1 -1
- package/esm/data/data-view-utils.js +1 -1
- package/esm/data/initialize.js +1 -1
- package/esm/data/register.js +1 -1
- package/esm/env/env.js +1 -1
- package/esm/env/env.js.map +1 -1
- package/esm/mark/arc.js +4 -2
- package/esm/mark/arc.js.map +1 -1
- package/esm/mark/area.js +6 -2
- package/esm/mark/area.js.map +1 -1
- package/esm/mark/base/base-line.js +2 -2
- package/esm/mark/base/base-line.js.map +1 -1
- package/esm/mark/base/base-mark.d.ts +0 -1
- package/esm/mark/base/base-mark.js +16 -24
- package/esm/mark/base/base-mark.js.map +1 -1
- package/esm/mark/glyph.d.ts +3 -0
- package/esm/mark/glyph.js +30 -4
- package/esm/mark/glyph.js.map +1 -1
- package/esm/mark/group.js +5 -4
- package/esm/mark/group.js.map +1 -1
- package/esm/mark/interface/common.js.map +1 -1
- package/esm/mark/line.js +6 -2
- package/esm/mark/line.js.map +1 -1
- package/esm/mark/rect.js +4 -2
- package/esm/mark/rect.js.map +1 -1
- package/esm/mark/symbol.js +4 -2
- package/esm/mark/symbol.js.map +1 -1
- package/esm/mark/text.js +5 -1
- package/esm/mark/text.js.map +1 -1
- package/esm/plugin/components/axis-sync/tick-align-transform.js +1 -1
- package/esm/plugin/components/axis-sync/tick-align-transform.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/canvas-tooltip-handler.d.ts +2 -2
- package/esm/plugin/components/tooltip-handler/canvas-tooltip-handler.js +1 -1
- package/esm/plugin/components/tooltip-handler/canvas-tooltip-handler.js.map +1 -1
- package/esm/plugin/other.js +2 -2
- package/esm/plugin/other.js.map +1 -1
- package/esm/series/base/base-series.d.ts +3 -0
- package/esm/series/base/base-series.js +54 -24
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/dot/dot.d.ts +1 -0
- package/esm/series/interface/common.d.ts +2 -1
- package/esm/series/interface/common.js.map +1 -1
- package/esm/series/line/line.js +3 -1
- package/esm/series/line/line.js.map +1 -1
- package/esm/series/waterfall/waterfall.d.ts +2 -0
- package/esm/series/waterfall/waterfall.js +12 -4
- package/esm/series/waterfall/waterfall.js.map +1 -1
- package/esm/series/word-cloud/animation.js +3 -0
- package/esm/series/word-cloud/animation.js.map +1 -1
- package/esm/theme/builtin/common/series/word-cloud.js +2 -6
- package/esm/theme/builtin/common/series/word-cloud.js.map +1 -1
- package/esm/util/mark.js +8 -2
- package/esm/util/mark.js.map +1 -1
- package/esm/util/math.d.ts +1 -1
- package/esm/util/math.js +1 -1
- package/esm/util/math.js.map +1 -1
- package/esm/util/style.js +23 -2
- package/esm/util/style.js.map +1 -1
- package/esm/util/text.js +1 -1
- package/esm/util/text.js.map +1 -1
- package/esm/vchart-line.d.ts +4 -0
- package/esm/vchart-line.js +28 -0
- package/esm/vchart-line.js.map +1 -0
- package/esm/vchart-simple.d.ts +5 -1
- package/esm/vchart-simple.js +9 -1
- package/esm/vchart-simple.js.map +1 -1
- package/package.json +10 -9
package/cjs/plugin/other.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/plugin/other.ts"],"names":[],"mappings":";;;AAAA,yDAAmG;AAoB5D,4GApB9B,0CAA2B,OAoB8B;AAAzD,6GApB6B,2CAA4B,OAoB7B;AAlBrC
|
|
1
|
+
{"version":3,"sources":["../src/plugin/other.ts"],"names":[],"mappings":";;;AAAA,yDAAmG;AAoB5D,4GApB9B,0CAA2B,OAoB8B;AAAzD,6GApB6B,2CAA4B,OAoB7B;AAlBrC,iEAA+F;AAC/F,sEAA4E;AAC5E,6CAA0C;AAC1C,gDAAuF;AAEhF,MAAM,eAAe,GAAG,GAAG,EAAE;IAClC,IAAA,0BAAsB,GAAE,CAAC;IACzB,IAAA,iCAAwB,GAAE,CAAC;IAC3B,IAAA,+BAAsB,GAAE,CAAC;AAC3B,CAAC,CAAC;AAJW,QAAA,eAAe,mBAI1B;AAEK,MAAM,kBAAkB,GAAG,GAAG,EAAE;IACrC,iBAAO,CAAC,wBAAwB,CAAC,MAAM,EAAE,qBAAS,CAAC,CAAC;AACtD,CAAC,CAAC;AAFW,QAAA,kBAAkB,sBAE7B;AACK,MAAM,qBAAqB,GAAG,GAAG,EAAE;IACxC,iBAAO,CAAC,wBAAwB,CAAC,SAAS,EAAE,mBAAO,CAAC,CAAC;AACvD,CAAC,CAAC;AAFW,QAAA,qBAAqB,yBAEhC","file":"other.js","sourcesContent":["import { registerHtmlAttributePlugin, registerReactAttributePlugin } from '@visactor/vrender-core';\n\nimport { registerAnimate as registerVRenderAnimate } from '@visactor/vrender-animate/register';\nimport { DragNDrop, Gesture } from '@visactor/vrender-kits/event/extension';\nimport { Factory } from '../core/factory';\nimport { registerBuiltInAnimation, registerStageAnimation } from '../animation/config';\n\nexport const registerAnimate = () => {\n registerVRenderAnimate();\n registerBuiltInAnimation();\n registerStageAnimation();\n};\n\nexport const registerDragPlugin = () => {\n Factory.registerStageEventPlugin('drag', DragNDrop);\n};\nexport const registerGesturePlugin = () => {\n Factory.registerStageEventPlugin('gesture', Gesture);\n};\n\nexport { registerReactAttributePlugin, registerHtmlAttributePlugin };\n// export const registerMorph = registerViewMorphAPI;\n"]}
|
|
@@ -20,8 +20,10 @@ export interface ISeriesSpecUpdatePolicy {
|
|
|
20
20
|
compileOnlyKeys?: Record<string, true>;
|
|
21
21
|
dataRelatedKeys?: Record<string, true>;
|
|
22
22
|
compileOnlySubKeys?: Record<string, Record<string, true>>;
|
|
23
|
+
seriesOnlyKeys?: Record<string, true>;
|
|
23
24
|
}
|
|
24
25
|
export declare function markSeriesCompileEffect(compareResult: IUpdateSpecResult, dataRelated?: boolean): void;
|
|
26
|
+
export declare function markSeriesOnlyEffect(compareResult: IUpdateSpecResult): void;
|
|
25
27
|
export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseModel<T> implements ISeries {
|
|
26
28
|
readonly specKey: string;
|
|
27
29
|
readonly type: string;
|
|
@@ -168,6 +170,7 @@ export declare abstract class BaseSeries<T extends ISeriesSpec> extends BaseMode
|
|
|
168
170
|
initSeriesStyleState(): void;
|
|
169
171
|
afterInitMark(): void;
|
|
170
172
|
getMarksWithoutRoot(): IMark[];
|
|
173
|
+
protected _getMarkSpecNamesForCompare(): string[];
|
|
171
174
|
getMarksInType(type: string | string[]): IMark[];
|
|
172
175
|
getMarkInName(name: string): IMark | undefined;
|
|
173
176
|
getMarkInId(markId: number): IMark | undefined;
|
|
@@ -2,12 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: !0
|
|
5
|
-
}), exports.BaseSeries = exports.markSeriesCompileEffect = void 0;
|
|
5
|
+
}), exports.BaseSeries = exports.markSeriesOnlyEffect = exports.markSeriesCompileEffect = void 0;
|
|
6
6
|
|
|
7
|
-
const event_1 = require("../../constant/event"), data_1 = require("../../constant/data"), attribute_1 = require("../../constant/attribute"), base_1 = require("../../constant/base"), vdataset_1 = require("@visactor/vdataset"), base_model_1 = require("../../model/base-model"), initialize_1 = require("../../data/initialize"), data_2 = require("../../util/data"), type_1 = require("../../util/type"), vutils_extension_1 = require("@visactor/vutils-extension"), add_property_1 = require("../../data/transforms/add-property"), register_1 = require("../../data/register"), tooltip_helper_1 = require("./tooltip-helper"), dimension_statistics_1 = require("../../data/transforms/dimension-statistics"), invalid_travel_1 = require("../../data/transforms/invalid-travel"), util_1 = require("../../theme/color-scheme/util"), data_key_1 = require("../../data/transforms/data-key"), mark_1 = require("../../compile/mark"), vutils_1 = require("@visactor/vutils"), color_ordinal_scale_1 = require("../../scale/color-ordinal-scale"), constant_1 = require("./constant"), utils_1 = require("../../animation/utils"), base_series_transformer_1 = require("./base-series-transformer"), config_1 = require("../../interaction/config"), layout_1 = require("../../constant/layout"), data_3 = require("../../compile/data"), util_2 = require("../../interaction/triggers/util"), defaultSeriesDataRelatedCheckKeys = Object.keys(constant_1.defaultSeriesCompileCheckKeys).reduce(((keys, key) => (constant_1.defaultSeriesCompileOnlyCheckKeys[key] || (keys[key] = !0),
|
|
7
|
+
const event_1 = require("../../constant/event"), data_1 = require("../../constant/data"), attribute_1 = require("../../constant/attribute"), base_1 = require("../../constant/base"), vdataset_1 = require("@visactor/vdataset"), base_model_1 = require("../../model/base-model"), initialize_1 = require("../../data/initialize"), data_2 = require("../../util/data"), type_1 = require("../../util/type"), vutils_extension_1 = require("@visactor/vutils-extension"), add_property_1 = require("../../data/transforms/add-property"), register_1 = require("../../data/register"), tooltip_helper_1 = require("./tooltip-helper"), dimension_statistics_1 = require("../../data/transforms/dimension-statistics"), invalid_travel_1 = require("../../data/transforms/invalid-travel"), util_1 = require("../../theme/color-scheme/util"), data_key_1 = require("../../data/transforms/data-key"), mark_1 = require("../../compile/mark"), factory_1 = require("../../core/factory"), vutils_1 = require("@visactor/vutils"), color_ordinal_scale_1 = require("../../scale/color-ordinal-scale"), constant_1 = require("./constant"), utils_1 = require("../../animation/utils"), base_series_transformer_1 = require("./base-series-transformer"), config_1 = require("../../interaction/config"), layout_1 = require("../../constant/layout"), data_3 = require("../../compile/data"), util_2 = require("../../interaction/triggers/util"), defaultSeriesDataRelatedCheckKeys = Object.keys(constant_1.defaultSeriesCompileCheckKeys).reduce(((keys, key) => (constant_1.defaultSeriesCompileOnlyCheckKeys[key] || (keys[key] = !0),
|
|
8
8
|
keys)), {}), defaultSeriesSpecUpdatePolicy = {
|
|
9
9
|
compileOnlyKeys: constant_1.defaultSeriesCompileOnlyCheckKeys,
|
|
10
|
-
dataRelatedKeys: defaultSeriesDataRelatedCheckKeys
|
|
10
|
+
dataRelatedKeys: defaultSeriesDataRelatedCheckKeys,
|
|
11
|
+
seriesOnlyKeys: {
|
|
12
|
+
tooltip: !0
|
|
13
|
+
}
|
|
11
14
|
}, defaultSeriesMarkCompileOnlySubKeys = {
|
|
12
15
|
interactive: !0,
|
|
13
16
|
zIndex: !0,
|
|
@@ -17,11 +20,13 @@ keys)), {}), defaultSeriesSpecUpdatePolicy = {
|
|
|
17
20
|
stateSort: !0,
|
|
18
21
|
customShape: !0
|
|
19
22
|
}, isSpecObject = value => (0, vutils_1.isObject)(value) && !(0, vutils_1.isArray)(value) && !(0,
|
|
20
|
-
vutils_1.isFunction)(value),
|
|
21
|
-
|
|
23
|
+
vutils_1.isFunction)(value), normalizeSpecObject = value => isSpecObject(value) ? value : (0,
|
|
24
|
+
vutils_1.isNil)(value) ? {} : null, hasOnlyAllowedSubKeyChanges = (specValue, prevSpecValue, allowedSubKeys) => {
|
|
25
|
+
const specObject = normalizeSpecObject(specValue), prevSpecObject = normalizeSpecObject(prevSpecValue);
|
|
26
|
+
if (!specObject || !prevSpecObject) return !1;
|
|
22
27
|
let changed = !1;
|
|
23
|
-
const subKeys = Array.from(new Set([ ...Object.keys(
|
|
24
|
-
for (const subKey of subKeys) if (!(0, vutils_1.isEqual)(
|
|
28
|
+
const subKeys = Array.from(new Set([ ...Object.keys(prevSpecObject), ...Object.keys(specObject) ]));
|
|
29
|
+
for (const subKey of subKeys) if (!(0, vutils_1.isEqual)(specObject[subKey], prevSpecObject[subKey])) {
|
|
25
30
|
if (!allowedSubKeys[subKey]) return !1;
|
|
26
31
|
changed = !0;
|
|
27
32
|
}
|
|
@@ -37,7 +42,14 @@ function markSeriesCompileEffect(compareResult, dataRelated = !1) {
|
|
|
37
42
|
}), dataRelated && (compareResult.effects.data = !0, compareResult.effects.scaleDomain = !0);
|
|
38
43
|
}
|
|
39
44
|
|
|
40
|
-
|
|
45
|
+
function markSeriesOnlyEffect(compareResult) {
|
|
46
|
+
compareResult.change = !0, compareResult.effects = Object.assign(Object.assign({}, compareResult.effects), {
|
|
47
|
+
series: !0,
|
|
48
|
+
render: !0
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
exports.markSeriesCompileEffect = markSeriesCompileEffect, exports.markSeriesOnlyEffect = markSeriesOnlyEffect;
|
|
41
53
|
|
|
42
54
|
class BaseSeries extends base_model_1.BaseModel {
|
|
43
55
|
getRegion() {
|
|
@@ -529,6 +541,14 @@ class BaseSeries extends base_model_1.BaseModel {
|
|
|
529
541
|
return !(null === (_a = m.name) || void 0 === _a ? void 0 : _a.includes("seriesGroup"));
|
|
530
542
|
}));
|
|
531
543
|
}
|
|
544
|
+
_getMarkSpecNamesForCompare() {
|
|
545
|
+
const names = new Set;
|
|
546
|
+
return this.getMarksWithoutRoot().forEach((mark => {
|
|
547
|
+
mark.name && names.add(mark.name);
|
|
548
|
+
})), Object.values(factory_1.Factory.getSeriesMarkMap(this.type)).forEach((markInfo => {
|
|
549
|
+
(null == markInfo ? void 0 : markInfo.name) && names.add(markInfo.name);
|
|
550
|
+
})), Array.from(names);
|
|
551
|
+
}
|
|
532
552
|
getMarksInType(type) {
|
|
533
553
|
return this._marks.getMarksInType(type);
|
|
534
554
|
}
|
|
@@ -560,10 +580,10 @@ class BaseSeries extends base_model_1.BaseModel {
|
|
|
560
580
|
return defaultSeriesSpecUpdatePolicy;
|
|
561
581
|
}
|
|
562
582
|
_compareSpec(spec, prevSpec, ignoreCheckKeys) {
|
|
563
|
-
var _a, _b, _c, _d;
|
|
583
|
+
var _a, _b, _c, _d, _e;
|
|
564
584
|
const result = super._compareSpec(spec, prevSpec), currentKeys = Object.keys(prevSpec || {}).sort(), nextKeys = Object.keys(spec || {}).sort();
|
|
565
585
|
if (!(0, vutils_1.isEqual)(currentKeys, nextKeys)) return result.reMake = !0, result;
|
|
566
|
-
const specUpdatePolicy = this._getSpecUpdatePolicy(), compileOnlyKeys = null !== (_a = specUpdatePolicy.compileOnlyKeys) && void 0 !== _a ? _a : {}, dataRelatedKeys = null !== (_b = specUpdatePolicy.dataRelatedKeys) && void 0 !== _b ? _b : {}, compileOnlySubKeys = null !== (_c = specUpdatePolicy.compileOnlySubKeys) && void 0 !== _c ? _c : {}, compileCheckKeys = Object.assign(Object.assign({}, compileOnlyKeys), dataRelatedKeys), ignores = Object.assign(Object.assign(Object.assign(Object.assign({}, constant_1.defaultSeriesIgnoreCheckKeys), compileCheckKeys), ignoreCheckKeys), {
|
|
586
|
+
const specUpdatePolicy = this._getSpecUpdatePolicy(), compileOnlyKeys = null !== (_a = specUpdatePolicy.compileOnlyKeys) && void 0 !== _a ? _a : {}, dataRelatedKeys = null !== (_b = specUpdatePolicy.dataRelatedKeys) && void 0 !== _b ? _b : {}, compileOnlySubKeys = null !== (_c = specUpdatePolicy.compileOnlySubKeys) && void 0 !== _c ? _c : {}, seriesOnlyKeys = null !== (_d = specUpdatePolicy.seriesOnlyKeys) && void 0 !== _d ? _d : {}, compileCheckKeys = Object.assign(Object.assign({}, compileOnlyKeys), dataRelatedKeys), ignores = Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({}, constant_1.defaultSeriesIgnoreCheckKeys), compileCheckKeys), seriesOnlyKeys), ignoreCheckKeys), {
|
|
567
587
|
extensionMark: !0,
|
|
568
588
|
label: !0,
|
|
569
589
|
totalLabel: !0
|
|
@@ -573,22 +593,23 @@ class BaseSeries extends base_model_1.BaseModel {
|
|
|
573
593
|
vutils_1.array)(spec.label), (0, vutils_1.array)(prevSpec.label), result), !result.reMake && this._compareLabelSpec((0,
|
|
574
594
|
vutils_1.array)(spec.totalLabel), (0, vutils_1.array)(prevSpec.totalLabel), result),
|
|
575
595
|
result.reMake) return result;
|
|
576
|
-
const changedMarkCompileOnlyKeys = this.
|
|
596
|
+
const changedMarkCompileOnlyKeys = this._getMarkSpecNamesForCompare().filter((name => hasOnlyAllowedSubKeyChanges(spec[name], prevSpec[name], defaultSeriesMarkCompileOnlySubKeys)));
|
|
577
597
|
changedMarkCompileOnlyKeys.forEach((k => {
|
|
578
598
|
ignores[k] = !0;
|
|
579
599
|
})), !result.reCompile && changedMarkCompileOnlyKeys.length && (result.reCompile = !0);
|
|
580
600
|
const changedCompileKeys = currentKeys.filter((k => compileCheckKeys[k] && !(0,
|
|
601
|
+
vutils_1.isEqual)(spec[k], prevSpec[k]))), changedSeriesOnlyKeys = currentKeys.filter((k => seriesOnlyKeys[k] && !(0,
|
|
581
602
|
vutils_1.isEqual)(spec[k], prevSpec[k]))), changedCompileOnlySubKeys = currentKeys.filter((k => compileOnlySubKeys[k] && hasOnlyAllowedSubKeyChanges(spec[k], prevSpec[k], compileOnlySubKeys[k])));
|
|
582
603
|
return changedCompileOnlySubKeys.forEach((k => {
|
|
583
604
|
ignores[k] = !0;
|
|
584
605
|
})), result.reCompile || !changedCompileKeys.length && !changedCompileOnlySubKeys.length || (result.reCompile = !0),
|
|
585
|
-
changedCompileKeys.some((k => dataRelatedKeys[k])) ? markSeriesCompileEffect(result, !0) : result.reCompile && !(null === (
|
|
586
|
-
currentKeys.some((k => !ignores[k] && !(0,
|
|
587
|
-
result) : result;
|
|
606
|
+
changedCompileKeys.some((k => dataRelatedKeys[k])) ? markSeriesCompileEffect(result, !0) : result.reCompile && !(null === (_e = result.effects) || void 0 === _e ? void 0 : _e.series) && (changedCompileKeys.length || changedCompileOnlySubKeys.length || changedMarkCompileOnlyKeys.length) && markSeriesCompileEffect(result),
|
|
607
|
+
changedSeriesOnlyKeys.length && markSeriesOnlyEffect(result), currentKeys.some((k => !ignores[k] && !(0,
|
|
608
|
+
vutils_1.isEqual)(spec[k], prevSpec[k]))) ? (result.reMake = !0, result) : result;
|
|
588
609
|
}
|
|
589
610
|
_updateSpecData() {
|
|
590
611
|
!this._rawData || !this._spec.data || this._spec.data instanceof vdataset_1.DataView || (0,
|
|
591
|
-
initialize_1.updateDataViewInData)(this._rawData, this._spec.data, !
|
|
612
|
+
initialize_1.updateDataViewInData)(this._rawData, this._spec.data, !1);
|
|
592
613
|
}
|
|
593
614
|
reInit(spec) {
|
|
594
615
|
super.reInit(spec);
|
|
@@ -626,15 +647,24 @@ class BaseSeries extends base_model_1.BaseModel {
|
|
|
626
647
|
};
|
|
627
648
|
}
|
|
628
649
|
_getSeriesInfo(field, keys) {
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
650
|
+
var _a;
|
|
651
|
+
const defaultShapeType = this.getDefaultShapeType(), rawData = null === (_a = this.getRawData()) || void 0 === _a ? void 0 : _a.latestData, rawDatumMap = new Map;
|
|
652
|
+
return null == rawData || rawData.forEach((datum => {
|
|
653
|
+
const key = this.getSeriesFieldValue(datum, field);
|
|
654
|
+
rawDatumMap.has(key) || rawDatumMap.set(key, datum);
|
|
655
|
+
})), keys.map((key => {
|
|
656
|
+
var _a;
|
|
657
|
+
const datum = null !== (_a = rawDatumMap.get(key)) && void 0 !== _a ? _a : {
|
|
634
658
|
[field]: key
|
|
635
|
-
}
|
|
636
|
-
|
|
637
|
-
|
|
659
|
+
};
|
|
660
|
+
return {
|
|
661
|
+
key: key,
|
|
662
|
+
originalKey: key,
|
|
663
|
+
datum: datum,
|
|
664
|
+
style: this.getSeriesStyle(datum),
|
|
665
|
+
shapeType: defaultShapeType
|
|
666
|
+
};
|
|
667
|
+
}));
|
|
638
668
|
}
|
|
639
669
|
getSeriesInfoInField(field) {
|
|
640
670
|
var _a, _b;
|
|
@@ -689,15 +719,15 @@ class BaseSeries extends base_model_1.BaseModel {
|
|
|
689
719
|
name: markInfo.name
|
|
690
720
|
}), isSeriesMark && (this._seriesMark = m), (0, vutils_1.isNil)(dataView) ? m.setData(this._data) : !1 !== dataView && m.setDataView(dataView),
|
|
691
721
|
m.setSkipBeforeLayouted(!1 !== skipBeforeLayouted), (0, vutils_1.isNil)(groupKey) || m.setGroupKey(groupKey);
|
|
692
|
-
const markConfig = Object.assign(Object.assign({}, config), {
|
|
722
|
+
const markCanMorph = null !== (_a = config.morph) && void 0 !== _a && _a, defaultMorphKeyIndex = this.getMarks().filter((mark => "group" === mark.type || mark.getMarkConfig().morph)).length + (markCanMorph ? 1 : 0), morphKey = (null === (_b = spec.morph) || void 0 === _b ? void 0 : _b.morphKey) || (markCanMorph ? `${this.getSpecIndex()}_${defaultMorphKeyIndex}` : void 0), markConfig = Object.assign(Object.assign({}, config), {
|
|
693
723
|
progressiveStep: spec.progressiveStep,
|
|
694
724
|
progressiveThreshold: spec.progressiveThreshold,
|
|
695
725
|
large: spec.large,
|
|
696
726
|
largeThreshold: spec.largeThreshold,
|
|
697
|
-
morph:
|
|
727
|
+
morph: markCanMorph,
|
|
698
728
|
useSequentialAnimation: spec.useSequentialAnimation,
|
|
699
|
-
support3d: null !== (
|
|
700
|
-
morphKey:
|
|
729
|
+
support3d: null !== (_c = config.support3d) && void 0 !== _c ? _c : spec.support3d || !!spec.zField,
|
|
730
|
+
morphKey: morphKey,
|
|
701
731
|
morphElementKey: null !== (_e = null === (_d = spec.morph) || void 0 === _d ? void 0 : _d.morphElementKey) && void 0 !== _e ? _e : config.morphElementKey
|
|
702
732
|
});
|
|
703
733
|
m.setMarkConfig(markConfig), this.initMarkStyleWithSpec(m, (0, vutils_extension_1.mergeSpec)({}, themeSpec, markSpec || spec[m.name]));
|