@visactor/vchart 2.0.2 → 2.0.3-alpha.1
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 +1 -1
- package/build/index.es.js +547 -487
- package/build/index.js +547 -486
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/utils.js +1 -1
- package/cjs/animation/utils.js.map +1 -1
- package/cjs/chart/base/base-chart-transformer.js +3 -3
- package/cjs/chart/base/base-chart-transformer.js.map +1 -1
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/chart/index.d.ts +2 -2
- package/cjs/chart/index.js +7 -2
- package/cjs/chart/index.js.map +1 -1
- package/cjs/chart/interface/common.d.ts +1 -1
- package/cjs/chart/interface/common.js.map +1 -1
- package/cjs/component/axis/base-axis.js +14 -13
- package/cjs/component/axis/base-axis.js.map +1 -1
- package/cjs/component/custom-mark/custom-mark.js +6 -9
- package/cjs/component/custom-mark/custom-mark.js.map +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/interface.d.ts +1 -0
- package/cjs/core/interface.js.map +1 -1
- package/cjs/core/vchart.d.ts +1 -0
- package/cjs/core/vchart.js +6 -5
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/mark/base/base-line.d.ts +1 -1
- package/cjs/mark/base/base-line.js.map +1 -1
- package/cjs/model/interface.d.ts +1 -1
- package/cjs/model/interface.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.d.ts +1 -1
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js +4 -3
- package/cjs/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
- package/cjs/series/base/base-series-transformer.js +1 -1
- package/cjs/series/base/base-series-transformer.js.map +1 -1
- package/cjs/series/sankey/sankey.d.ts +10 -10
- package/cjs/series/sankey/sankey.js +199 -194
- package/cjs/series/sankey/sankey.js.map +1 -1
- package/cjs/util/object.d.ts +1 -0
- package/cjs/util/object.js +13 -2
- package/cjs/util/object.js.map +1 -1
- package/esm/animation/utils.js +1 -1
- package/esm/animation/utils.js.map +1 -1
- package/esm/chart/base/base-chart-transformer.js +3 -3
- package/esm/chart/base/base-chart-transformer.js.map +1 -1
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/chart/index.d.ts +2 -2
- package/esm/chart/index.js +2 -2
- package/esm/chart/index.js.map +1 -1
- package/esm/chart/interface/common.d.ts +1 -1
- package/esm/chart/interface/common.js.map +1 -1
- package/esm/component/axis/base-axis.js +8 -8
- package/esm/component/axis/base-axis.js.map +1 -1
- package/esm/component/custom-mark/custom-mark.js +6 -9
- package/esm/component/custom-mark/custom-mark.js.map +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/interface.d.ts +1 -0
- package/esm/core/interface.js.map +1 -1
- package/esm/core/vchart.d.ts +1 -0
- package/esm/core/vchart.js +7 -6
- package/esm/core/vchart.js.map +1 -1
- package/esm/mark/base/base-line.d.ts +1 -1
- package/esm/mark/base/base-line.js.map +1 -1
- package/esm/model/interface.d.ts +1 -1
- package/esm/model/interface.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.d.ts +1 -1
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js +4 -3
- package/esm/plugin/components/tooltip-handler/dom-tooltip-handler.js.map +1 -1
- package/esm/series/base/base-series-transformer.js +1 -1
- package/esm/series/base/base-series-transformer.js.map +1 -1
- package/esm/series/sankey/sankey.d.ts +10 -10
- package/esm/series/sankey/sankey.js +192 -187
- package/esm/series/sankey/sankey.js.map +1 -1
- package/esm/util/object.d.ts +1 -0
- package/esm/util/object.js +11 -0
- package/esm/util/object.js.map +1 -1
- package/package.json +12 -12
package/esm/core/vchart.d.ts
CHANGED
|
@@ -208,6 +208,7 @@ export declare class VChart implements IVChart {
|
|
|
208
208
|
private _chartPluginApply;
|
|
209
209
|
protected _getMode(): (typeof RenderModeEnum)["desktop-browser"] | "desktop-browser" | "mobile-browser" | "node" | "worker" | "miniApp" | "wx" | "tt" | "harmony" | "desktop-miniApp" | "lynx";
|
|
210
210
|
protected getTheme: (...keys: string[]) => any;
|
|
211
|
+
isAnimationEnable(): boolean;
|
|
211
212
|
protected _getChartOption(type: string): IChartOption;
|
|
212
213
|
}
|
|
213
214
|
export declare const registerVChartCore: () => void;
|
package/esm/core/vchart.js
CHANGED
|
@@ -42,7 +42,7 @@ import { DataSet, dataViewParser, DataView } from "@visactor/vdataset";
|
|
|
42
42
|
|
|
43
43
|
import { vglobal } from "@visactor/vrender-core";
|
|
44
44
|
|
|
45
|
-
import { isString, isValid, isNil, array, specTransform, functionTransform } from "../util";
|
|
45
|
+
import { isString, isValid, isNil, array, specTransform, functionTransform, removeUndefined } from "../util";
|
|
46
46
|
|
|
47
47
|
import { createID } from "../util/id";
|
|
48
48
|
|
|
@@ -247,9 +247,8 @@ export class VChart {
|
|
|
247
247
|
[key]: theme
|
|
248
248
|
}, this._currentTheme.colorScheme, this._currentTheme.token)[key]);
|
|
249
249
|
})), this._cachedProcessedTheme[cacheKey] = theme, theme;
|
|
250
|
-
}, this._option = Object.assign(Object.assign(
|
|
251
|
-
|
|
252
|
-
}), options), (null == options ? void 0 : options.optimize) && (this._option.optimize = Object.assign(Object.assign({}, this._option.optimize), options.optimize)),
|
|
250
|
+
}, removeUndefined(options), this._option = Object.assign(Object.assign({}, this._option), options),
|
|
251
|
+
(null == options ? void 0 : options.optimize) && (this._option.optimize = Object.assign(Object.assign({}, this._option.optimize), options.optimize)),
|
|
253
252
|
this._onError = null === (_a = this._option) || void 0 === _a ? void 0 : _a.onError;
|
|
254
253
|
const _k = this._option, {dom: dom, renderCanvas: renderCanvas, mode: mode, stage: stage, poptip: poptip} = _k, restOptions = __rest(_k, [ "dom", "renderCanvas", "mode", "stage", "poptip" ]), isTrueBrowseEnv = isTrueBrowser(mode);
|
|
255
254
|
if (isTrueBrowseEnv ? registerBrowserEnv() : "node" === mode && registerNodeEnv(),
|
|
@@ -435,7 +434,7 @@ export class VChart {
|
|
|
435
434
|
}
|
|
436
435
|
_updateAnimateState(initial) {
|
|
437
436
|
var _a, _b;
|
|
438
|
-
if (this.
|
|
437
|
+
if (this.isAnimationEnable()) {
|
|
439
438
|
const updateGraphicAnimationState = graphic => {
|
|
440
439
|
var _a;
|
|
441
440
|
const diffState = null === (_a = graphic.context) || void 0 === _a ? void 0 : _a.diffState;
|
|
@@ -941,6 +940,9 @@ export class VChart {
|
|
|
941
940
|
_getMode() {
|
|
942
941
|
return this._option.mode || RenderModeEnum["desktop-browser"];
|
|
943
942
|
}
|
|
943
|
+
isAnimationEnable() {
|
|
944
|
+
return "animation" in this._option ? !!this._option.animation : !1 !== this._spec.animation;
|
|
945
|
+
}
|
|
944
946
|
_getChartOption(type) {
|
|
945
947
|
return {
|
|
946
948
|
type: type,
|
|
@@ -954,7 +956,6 @@ export class VChart {
|
|
|
954
956
|
modeParams: this._option.modeParams,
|
|
955
957
|
getCompiler: () => this._compiler,
|
|
956
958
|
viewBox: this._viewBox,
|
|
957
|
-
animation: this._option.animation,
|
|
958
959
|
getTheme: this.getTheme,
|
|
959
960
|
getSpecInfo: () => {
|
|
960
961
|
var _a;
|