@visactor/vchart 2.0.19 → 2.0.20-alpha.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 +1 -1
- package/build/index.es.js +19 -11
- package/build/index.js +19 -11
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/compile/mark/interface.d.ts +1 -0
- package/cjs/compile/mark/interface.js.map +1 -1
- package/cjs/compile/mark/mark-state-manager.d.ts +1 -0
- package/cjs/compile/mark/mark-state-manager.js +3 -0
- package/cjs/compile/mark/mark-state-manager.js.map +1 -1
- package/cjs/core/vchart.js +3 -8
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/data/transforms/circle-packing.d.ts +1 -0
- package/cjs/data/transforms/circle-packing.js.map +1 -1
- package/cjs/mark/base/base-mark.d.ts +1 -0
- package/cjs/mark/base/base-mark.js +3 -0
- package/cjs/mark/base/base-mark.js.map +1 -1
- package/cjs/mark/interface/common.d.ts +1 -0
- package/cjs/mark/interface/common.js.map +1 -1
- package/cjs/series/base/base-series.js +1 -1
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/circle-packing/circle-packing.js +1 -0
- package/cjs/series/circle-packing/circle-packing.js.map +1 -1
- package/esm/compile/mark/interface.d.ts +1 -0
- package/esm/compile/mark/interface.js.map +1 -1
- package/esm/compile/mark/mark-state-manager.d.ts +1 -0
- package/esm/compile/mark/mark-state-manager.js +3 -0
- package/esm/compile/mark/mark-state-manager.js.map +1 -1
- package/esm/core/vchart.js +2 -5
- package/esm/core/vchart.js.map +1 -1
- package/esm/data/transforms/circle-packing.d.ts +1 -0
- package/esm/data/transforms/circle-packing.js.map +1 -1
- package/esm/mark/base/base-mark.d.ts +1 -0
- package/esm/mark/base/base-mark.js +3 -0
- package/esm/mark/base/base-mark.js.map +1 -1
- package/esm/mark/interface/common.d.ts +1 -0
- package/esm/mark/interface/common.js.map +1 -1
- package/esm/series/base/base-series.js +1 -1
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/circle-packing/circle-packing.js +1 -0
- package/esm/series/circle-packing/circle-packing.js.map +1 -1
- package/package.json +8 -8
package/build/index.es.js
CHANGED
|
@@ -57698,6 +57698,9 @@ class MarkStateManager extends StateManager {
|
|
|
57698
57698
|
}
|
|
57699
57699
|
});
|
|
57700
57700
|
}
|
|
57701
|
+
clearAllStateInfo() {
|
|
57702
|
+
this._stateInfoList = [];
|
|
57703
|
+
}
|
|
57701
57704
|
_isMultiMark() {
|
|
57702
57705
|
return !this._mark || isMultiDatumMark(this._mark.type);
|
|
57703
57706
|
}
|
|
@@ -59420,6 +59423,11 @@ class BaseMark extends GrammarItem {
|
|
|
59420
59423
|
runAnimation() {
|
|
59421
59424
|
this._runStateAnimation(this.getGraphics());
|
|
59422
59425
|
}
|
|
59426
|
+
clearBeforeReInit() {
|
|
59427
|
+
this.state.clearAllStateInfo();
|
|
59428
|
+
this.uncommit();
|
|
59429
|
+
this.stateStyle = {};
|
|
59430
|
+
}
|
|
59423
59431
|
}
|
|
59424
59432
|
|
|
59425
59433
|
var MarkTypeEnum;
|
|
@@ -61230,15 +61238,12 @@ class VChart {
|
|
|
61230
61238
|
};
|
|
61231
61239
|
let currentTheme;
|
|
61232
61240
|
if (!isEmpty(optionTheme) || !isEmpty(specTheme)) {
|
|
61233
|
-
|
|
61234
|
-
|
|
61235
|
-
|
|
61236
|
-
|
|
61237
|
-
|
|
61238
|
-
|
|
61239
|
-
const finalTheme = mergeTheme({}, getThemeObject(this._currentThemeName), getThemeObject(optionTheme), getThemeObject(specTheme));
|
|
61240
|
-
this._currentTheme = processThemeByChartType(chartType, finalTheme);
|
|
61241
|
-
}
|
|
61241
|
+
const finalTheme = mergeTheme({}, getThemeObject(isObject$2(specTheme) && specTheme.type
|
|
61242
|
+
? specTheme.type
|
|
61243
|
+
: isObject$2(optionTheme) && optionTheme.type
|
|
61244
|
+
? optionTheme.type
|
|
61245
|
+
: this._currentThemeName), getThemeObject(optionTheme), getThemeObject(specTheme));
|
|
61246
|
+
this._currentTheme = processThemeByChartType(chartType, finalTheme);
|
|
61242
61247
|
}
|
|
61243
61248
|
else {
|
|
61244
61249
|
currentTheme = getThemeObject(this._currentThemeName);
|
|
@@ -63522,6 +63527,7 @@ class BaseSeries extends BaseModel {
|
|
|
63522
63527
|
super.reInit(spec);
|
|
63523
63528
|
const marks = this.getMarksWithoutRoot();
|
|
63524
63529
|
marks.forEach(mark => {
|
|
63530
|
+
mark.clearBeforeReInit();
|
|
63525
63531
|
this._spec[mark.name] && this.initMarkStyleWithSpec(mark, this._spec[mark.name]);
|
|
63526
63532
|
});
|
|
63527
63533
|
this.initMarkStyle();
|
|
@@ -82110,13 +82116,14 @@ function translateChild(k, maxDepth) {
|
|
|
82110
82116
|
}
|
|
82111
82117
|
class CirclePackingLayout {
|
|
82112
82118
|
constructor(options) {
|
|
82119
|
+
var _a;
|
|
82113
82120
|
this.options = options;
|
|
82114
82121
|
const keyOption = null == options ? void 0 : options.nodeKey,
|
|
82115
82122
|
keyFunc = isFunction$1(keyOption) ? keyOption : keyOption ? field$2(keyOption) : null;
|
|
82116
82123
|
this._getNodeKey = keyFunc, this._getPadding = isNumber$1(null == options ? void 0 : options.padding) ? node => options.padding : isArray$1(null == options ? void 0 : options.padding) ? node => {
|
|
82117
82124
|
var _a;
|
|
82118
82125
|
return null !== (_a = options.padding[node.depth + 1]) && void 0 !== _a ? _a : 0;
|
|
82119
|
-
} : () => 0, this._maxDepth = -1;
|
|
82126
|
+
} : () => 0, this._maxDepth = -1, this._valueField = null !== (_a = null == options ? void 0 : options.valueField) && void 0 !== _a ? _a : "value";
|
|
82120
82127
|
}
|
|
82121
82128
|
layout(data, config) {
|
|
82122
82129
|
var _a;
|
|
@@ -82137,7 +82144,7 @@ class CirclePackingLayout {
|
|
|
82137
82144
|
};
|
|
82138
82145
|
if (!data || !data.length) return [];
|
|
82139
82146
|
const nodes = [],
|
|
82140
|
-
res = calculateNodeValue$1(data, nodes, 0, -1, null, this._getNodeKey);
|
|
82147
|
+
res = calculateNodeValue$1(data, nodes, 0, -1, null, this._getNodeKey, this._valueField);
|
|
82141
82148
|
this._maxDepth = res.maxDepth;
|
|
82142
82149
|
const random = randomLCG(),
|
|
82143
82150
|
root = {
|
|
@@ -88752,6 +88759,7 @@ class CirclePackingSeries extends CartesianSeries {
|
|
|
88752
88759
|
options: () => {
|
|
88753
88760
|
return {
|
|
88754
88761
|
nodeKey: this._categoryField,
|
|
88762
|
+
valueField: this._valueField,
|
|
88755
88763
|
padding: this._layoutPadding,
|
|
88756
88764
|
includeRoot: false,
|
|
88757
88765
|
width: this.getLayoutRect().width || 1,
|
package/build/index.js
CHANGED
|
@@ -57704,6 +57704,9 @@
|
|
|
57704
57704
|
}
|
|
57705
57705
|
});
|
|
57706
57706
|
}
|
|
57707
|
+
clearAllStateInfo() {
|
|
57708
|
+
this._stateInfoList = [];
|
|
57709
|
+
}
|
|
57707
57710
|
_isMultiMark() {
|
|
57708
57711
|
return !this._mark || isMultiDatumMark(this._mark.type);
|
|
57709
57712
|
}
|
|
@@ -59426,6 +59429,11 @@
|
|
|
59426
59429
|
runAnimation() {
|
|
59427
59430
|
this._runStateAnimation(this.getGraphics());
|
|
59428
59431
|
}
|
|
59432
|
+
clearBeforeReInit() {
|
|
59433
|
+
this.state.clearAllStateInfo();
|
|
59434
|
+
this.uncommit();
|
|
59435
|
+
this.stateStyle = {};
|
|
59436
|
+
}
|
|
59429
59437
|
}
|
|
59430
59438
|
|
|
59431
59439
|
exports.MarkTypeEnum = void 0;
|
|
@@ -61236,15 +61244,12 @@
|
|
|
61236
61244
|
};
|
|
61237
61245
|
let currentTheme;
|
|
61238
61246
|
if (!isEmpty(optionTheme) || !isEmpty(specTheme)) {
|
|
61239
|
-
|
|
61240
|
-
|
|
61241
|
-
|
|
61242
|
-
|
|
61243
|
-
|
|
61244
|
-
|
|
61245
|
-
const finalTheme = mergeTheme({}, getThemeObject(this._currentThemeName), getThemeObject(optionTheme), getThemeObject(specTheme));
|
|
61246
|
-
this._currentTheme = processThemeByChartType(chartType, finalTheme);
|
|
61247
|
-
}
|
|
61247
|
+
const finalTheme = mergeTheme({}, getThemeObject(isObject$2(specTheme) && specTheme.type
|
|
61248
|
+
? specTheme.type
|
|
61249
|
+
: isObject$2(optionTheme) && optionTheme.type
|
|
61250
|
+
? optionTheme.type
|
|
61251
|
+
: this._currentThemeName), getThemeObject(optionTheme), getThemeObject(specTheme));
|
|
61252
|
+
this._currentTheme = processThemeByChartType(chartType, finalTheme);
|
|
61248
61253
|
}
|
|
61249
61254
|
else {
|
|
61250
61255
|
currentTheme = getThemeObject(this._currentThemeName);
|
|
@@ -63528,6 +63533,7 @@
|
|
|
63528
63533
|
super.reInit(spec);
|
|
63529
63534
|
const marks = this.getMarksWithoutRoot();
|
|
63530
63535
|
marks.forEach(mark => {
|
|
63536
|
+
mark.clearBeforeReInit();
|
|
63531
63537
|
this._spec[mark.name] && this.initMarkStyleWithSpec(mark, this._spec[mark.name]);
|
|
63532
63538
|
});
|
|
63533
63539
|
this.initMarkStyle();
|
|
@@ -82116,13 +82122,14 @@
|
|
|
82116
82122
|
}
|
|
82117
82123
|
class CirclePackingLayout {
|
|
82118
82124
|
constructor(options) {
|
|
82125
|
+
var _a;
|
|
82119
82126
|
this.options = options;
|
|
82120
82127
|
const keyOption = null == options ? void 0 : options.nodeKey,
|
|
82121
82128
|
keyFunc = isFunction$1(keyOption) ? keyOption : keyOption ? field$2(keyOption) : null;
|
|
82122
82129
|
this._getNodeKey = keyFunc, this._getPadding = isNumber$1(null == options ? void 0 : options.padding) ? node => options.padding : isArray$1(null == options ? void 0 : options.padding) ? node => {
|
|
82123
82130
|
var _a;
|
|
82124
82131
|
return null !== (_a = options.padding[node.depth + 1]) && void 0 !== _a ? _a : 0;
|
|
82125
|
-
} : () => 0, this._maxDepth = -1;
|
|
82132
|
+
} : () => 0, this._maxDepth = -1, this._valueField = null !== (_a = null == options ? void 0 : options.valueField) && void 0 !== _a ? _a : "value";
|
|
82126
82133
|
}
|
|
82127
82134
|
layout(data, config) {
|
|
82128
82135
|
var _a;
|
|
@@ -82143,7 +82150,7 @@
|
|
|
82143
82150
|
};
|
|
82144
82151
|
if (!data || !data.length) return [];
|
|
82145
82152
|
const nodes = [],
|
|
82146
|
-
res = calculateNodeValue$1(data, nodes, 0, -1, null, this._getNodeKey);
|
|
82153
|
+
res = calculateNodeValue$1(data, nodes, 0, -1, null, this._getNodeKey, this._valueField);
|
|
82147
82154
|
this._maxDepth = res.maxDepth;
|
|
82148
82155
|
const random = randomLCG(),
|
|
82149
82156
|
root = {
|
|
@@ -88758,6 +88765,7 @@
|
|
|
88758
88765
|
options: () => {
|
|
88759
88766
|
return {
|
|
88760
88767
|
nodeKey: this._categoryField,
|
|
88768
|
+
valueField: this._valueField,
|
|
88761
88769
|
padding: this._layoutPadding,
|
|
88762
88770
|
includeRoot: false,
|
|
88763
88771
|
width: this.getLayoutRect().width || 1,
|