@visactor/vchart 1.11.8 → 1.11.9
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.js +82 -47
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/base/base-chart.js +1 -0
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/chart/stack.js +2 -1
- package/cjs/chart/util.js +2 -1
- package/cjs/chart/util.js.map +1 -1
- package/cjs/compile/grammar-item.js +1 -2
- package/cjs/component/label/label.js.map +1 -1
- package/cjs/component/tooltip/interface/spec.d.ts +1 -1
- package/cjs/component/tooltip/interface/spec.js.map +1 -1
- package/cjs/component/tooltip/interface/theme.d.ts +1 -0
- package/cjs/component/tooltip/interface/theme.js.map +1 -1
- package/cjs/component/tooltip/tooltip-transformer.js +3 -0
- package/cjs/component/tooltip/tooltip-transformer.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/vchart.d.ts +1 -0
- package/cjs/core/vchart.js +34 -28
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/model/interface.d.ts +1 -0
- package/cjs/model/interface.js.map +1 -1
- package/cjs/series/base/base-series.js +13 -12
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/polar/animation.js +6 -6
- package/cjs/series/polar/animation.js.map +1 -1
- package/cjs/series/waterfall/waterfall-transformer.js +1 -1
- package/cjs/series/waterfall/waterfall-transformer.js.map +1 -1
- package/cjs/series/waterfall/waterfall.d.ts +1 -0
- package/cjs/series/waterfall/waterfall.js +13 -13
- package/cjs/series/waterfall/waterfall.js.map +1 -1
- package/esm/chart/base/base-chart.js +1 -0
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/chart/stack.js +2 -1
- package/esm/chart/util.js +2 -1
- package/esm/chart/util.js.map +1 -1
- package/esm/compile/grammar-item.js +1 -2
- package/esm/component/label/label.js.map +1 -1
- package/esm/component/tooltip/interface/spec.d.ts +1 -1
- package/esm/component/tooltip/interface/spec.js.map +1 -1
- package/esm/component/tooltip/interface/theme.d.ts +1 -0
- package/esm/component/tooltip/interface/theme.js.map +1 -1
- package/esm/component/tooltip/tooltip-transformer.js +4 -1
- package/esm/component/tooltip/tooltip-transformer.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/vchart.d.ts +1 -0
- package/esm/core/vchart.js +34 -28
- package/esm/core/vchart.js.map +1 -1
- package/esm/model/interface.d.ts +1 -0
- package/esm/model/interface.js.map +1 -1
- package/esm/series/base/base-series.js +12 -11
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/polar/animation.js +5 -6
- package/esm/series/polar/animation.js.map +1 -1
- package/esm/series/waterfall/waterfall-transformer.js +1 -1
- package/esm/series/waterfall/waterfall-transformer.js.map +1 -1
- package/esm/series/waterfall/waterfall.d.ts +1 -0
- package/esm/series/waterfall/waterfall.js +12 -12
- package/esm/series/waterfall/waterfall.js.map +1 -1
- package/package.json +16 -16
package/build/index.js
CHANGED
|
@@ -23573,13 +23573,14 @@
|
|
|
23573
23573
|
if (!this.htmlMap || !this.htmlMap[id]) return;
|
|
23574
23574
|
const {
|
|
23575
23575
|
root: root,
|
|
23576
|
-
wrapContainer: wrapContainer
|
|
23576
|
+
wrapContainer: wrapContainer,
|
|
23577
|
+
unmount: unmount
|
|
23577
23578
|
} = this.htmlMap[id];
|
|
23578
23579
|
if (root) {
|
|
23579
23580
|
application.global.getRequestAnimationFrame()(() => {
|
|
23580
23581
|
root.unmount();
|
|
23581
23582
|
});
|
|
23582
|
-
}
|
|
23583
|
+
} else unmount && unmount();
|
|
23583
23584
|
wrapContainer && application.global.removeDom(wrapContainer), this.htmlMap[id] = null;
|
|
23584
23585
|
}
|
|
23585
23586
|
renderGraphicHTML(graphic) {
|
|
@@ -23595,23 +23596,31 @@
|
|
|
23595
23596
|
element: element,
|
|
23596
23597
|
container: container
|
|
23597
23598
|
} = react;
|
|
23598
|
-
if (!
|
|
23599
|
+
if (!element || !ReactDOM || !ReactDOM.createRoot && !ReactDOM.render) return;
|
|
23599
23600
|
const id = isNil$1(react.id) ? `${null !== (_a = graphic.id) && void 0 !== _a ? _a : graphic._uid}_react` : react.id;
|
|
23600
|
-
if (this.htmlMap && this.htmlMap[id] && container && container !== this.htmlMap[id].container && this.removeElement(id), this.htmlMap && this.htmlMap[id]) this.htmlMap[id].root.render(element);else {
|
|
23601
|
+
if (this.htmlMap && this.htmlMap[id] && container && container !== this.htmlMap[id].container && this.removeElement(id), this.htmlMap && this.htmlMap[id]) ReactDOM.createRoot ? this.htmlMap[id].root.render(element) : ReactDOM.render(element, this.htmlMap[id].wrapContainer);else {
|
|
23601
23602
|
const {
|
|
23602
23603
|
wrapContainer: wrapContainer,
|
|
23603
23604
|
nativeContainer: nativeContainer
|
|
23604
23605
|
} = this.getWrapContainer(stage, container);
|
|
23605
|
-
if (wrapContainer) {
|
|
23606
|
+
if (wrapContainer) if (this.htmlMap || (this.htmlMap = {}), ReactDOM.createRoot) {
|
|
23606
23607
|
const root = ReactDOM.createRoot(wrapContainer);
|
|
23607
|
-
root.render(element), this.htmlMap
|
|
23608
|
+
root.render(element), this.htmlMap[id] = {
|
|
23608
23609
|
root: root,
|
|
23609
23610
|
wrapContainer: wrapContainer,
|
|
23610
23611
|
nativeContainer: nativeContainer,
|
|
23611
23612
|
container: container,
|
|
23612
23613
|
renderId: this.renderId
|
|
23613
23614
|
};
|
|
23614
|
-
}
|
|
23615
|
+
} else ReactDOM.render(element, wrapContainer), this.htmlMap[id] = {
|
|
23616
|
+
wrapContainer: wrapContainer,
|
|
23617
|
+
nativeContainer: nativeContainer,
|
|
23618
|
+
container: container,
|
|
23619
|
+
renderId: this.renderId,
|
|
23620
|
+
unmount: () => {
|
|
23621
|
+
ReactDOM.unmountComponentAtNode(wrapContainer);
|
|
23622
|
+
}
|
|
23623
|
+
};
|
|
23615
23624
|
}
|
|
23616
23625
|
if (!this.htmlMap || !this.htmlMap[id]) return;
|
|
23617
23626
|
const {
|
|
@@ -57280,7 +57289,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57280
57289
|
reMake: merge('reMake'),
|
|
57281
57290
|
reRender: merge('reRender'),
|
|
57282
57291
|
reSize: merge('reSize'),
|
|
57283
|
-
reTransformSpec: merge('reTransformSpec')
|
|
57292
|
+
reTransformSpec: merge('reTransformSpec'),
|
|
57293
|
+
changeTheme: merge('changeTheme')
|
|
57284
57294
|
});
|
|
57285
57295
|
return target;
|
|
57286
57296
|
}
|
|
@@ -61086,7 +61096,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61086
61096
|
return this._dataSet;
|
|
61087
61097
|
}
|
|
61088
61098
|
constructor(spec, options) {
|
|
61089
|
-
var _a, _b, _c, _d, _e, _f
|
|
61099
|
+
var _a, _b, _c, _d, _e, _f;
|
|
61090
61100
|
this.id = createID();
|
|
61091
61101
|
this._userEvents = [];
|
|
61092
61102
|
this._autoSize = true;
|
|
@@ -61106,7 +61116,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61106
61116
|
}, 100);
|
|
61107
61117
|
this._option = merge$2(this._option, { animation: spec.animation !== false }, options);
|
|
61108
61118
|
this._onError = (_a = this._option) === null || _a === void 0 ? void 0 : _a.onError;
|
|
61109
|
-
const
|
|
61119
|
+
const _g = this._option, { dom, renderCanvas, mode, stage, poptip } = _g, restOptions = __rest$7(_g, ["dom", "renderCanvas", "mode", "stage", "poptip"]);
|
|
61110
61120
|
const isTrueBrowseEnv = isTrueBrowser(mode);
|
|
61111
61121
|
if (isTrueBrowseEnv && dom) {
|
|
61112
61122
|
this._container = isString$1(dom) ? document === null || document === void 0 ? void 0 : document.getElementById(dom) : dom;
|
|
@@ -61140,11 +61150,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61140
61150
|
this._eventDispatcher = new EventDispatcher(this, this._compiler);
|
|
61141
61151
|
this._event = new Event$1(this._eventDispatcher, mode);
|
|
61142
61152
|
this._compiler.initView();
|
|
61143
|
-
(_d = this.
|
|
61144
|
-
text: { fontFamily: (_e = this._currentTheme) === null || _e === void 0 ? void 0 : _e.fontFamily }
|
|
61145
|
-
});
|
|
61153
|
+
this._setFontFamilyTheme((_d = this._currentTheme) === null || _d === void 0 ? void 0 : _d.fontFamily);
|
|
61146
61154
|
this._initDataSet(this._option.dataSet);
|
|
61147
|
-
this._autoSize = isTrueBrowseEnv ? (
|
|
61155
|
+
this._autoSize = isTrueBrowseEnv ? (_f = (_e = spec.autoFit) !== null && _e !== void 0 ? _e : this._option.autoFit) !== null && _f !== void 0 ? _f : true : false;
|
|
61148
61156
|
this._bindResizeEvent();
|
|
61149
61157
|
this._bindVGrammarViewEvent();
|
|
61150
61158
|
this._initChartPlugin();
|
|
@@ -61329,6 +61337,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61329
61337
|
this._chartSpecTransformer = null;
|
|
61330
61338
|
(_a = this._chart) === null || _a === void 0 ? void 0 : _a.release();
|
|
61331
61339
|
this._chart = null;
|
|
61340
|
+
if (updateResult.changeTheme) {
|
|
61341
|
+
this._setCurrentTheme();
|
|
61342
|
+
}
|
|
61332
61343
|
(_b = this._compiler) === null || _b === void 0 ? void 0 : _b.releaseGrammar(((_c = this._option) === null || _c === void 0 ? void 0 : _c.animation) === false || ((_d = this._spec) === null || _d === void 0 ? void 0 : _d.animation) === false);
|
|
61333
61344
|
this._userEvents.forEach(e => { var _a; return (_a = this._event) === null || _a === void 0 ? void 0 : _a.on(e.eType, e.query, e.handler); });
|
|
61334
61345
|
if (updateResult.reSize) {
|
|
@@ -61336,6 +61347,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61336
61347
|
}
|
|
61337
61348
|
}
|
|
61338
61349
|
else {
|
|
61350
|
+
if (updateResult.changeTheme) {
|
|
61351
|
+
this._setCurrentTheme();
|
|
61352
|
+
}
|
|
61339
61353
|
if (updateResult.reCompile) {
|
|
61340
61354
|
(_e = this._compiler) === null || _e === void 0 ? void 0 : _e.clear({ chart: this._chart, vChart: this }, !this._option.animation || !this._spec.animation);
|
|
61341
61355
|
(_f = this._compiler) === null || _f === void 0 ? void 0 : _f.compile({ chart: this._chart, vChart: this }, {});
|
|
@@ -61595,31 +61609,31 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61595
61609
|
_updateSpec(spec, forceMerge = false, userUpdateOptions) {
|
|
61596
61610
|
var _a, _b;
|
|
61597
61611
|
const lastSpec = this._spec;
|
|
61612
|
+
const result = {
|
|
61613
|
+
reTransformSpec: false,
|
|
61614
|
+
change: false,
|
|
61615
|
+
reMake: false,
|
|
61616
|
+
reCompile: false,
|
|
61617
|
+
reSize: false,
|
|
61618
|
+
changeTheme: false
|
|
61619
|
+
};
|
|
61598
61620
|
if (!this._setNewSpec(spec, forceMerge)) {
|
|
61599
61621
|
return undefined;
|
|
61600
61622
|
}
|
|
61601
61623
|
if (!isEqual$1(lastSpec.theme, this._spec.theme)) {
|
|
61602
|
-
|
|
61624
|
+
result.changeTheme = true;
|
|
61603
61625
|
}
|
|
61604
61626
|
const reSize = this._shouldChartResize(lastSpec);
|
|
61627
|
+
result.reSize = reSize;
|
|
61605
61628
|
(_b = (_a = this._compiler) === null || _a === void 0 ? void 0 : _a.getVGrammarView()) === null || _b === void 0 ? void 0 : _b.updateLayoutTag();
|
|
61606
61629
|
if (this._spec.type !== lastSpec.type) {
|
|
61607
|
-
|
|
61608
|
-
|
|
61609
|
-
|
|
61610
|
-
|
|
61611
|
-
reCompile: false,
|
|
61612
|
-
reSize: reSize
|
|
61613
|
-
};
|
|
61630
|
+
result.reMake = true;
|
|
61631
|
+
result.reTransformSpec = true;
|
|
61632
|
+
result.change = true;
|
|
61633
|
+
return result;
|
|
61614
61634
|
}
|
|
61615
61635
|
this._initChartSpec(this._spec, 'render');
|
|
61616
|
-
const res = mergeUpdateResult(this._chart.updateSpec(this._spec),
|
|
61617
|
-
reTransformSpec: false,
|
|
61618
|
-
change: reSize,
|
|
61619
|
-
reMake: false,
|
|
61620
|
-
reCompile: false,
|
|
61621
|
-
reSize
|
|
61622
|
-
});
|
|
61636
|
+
const res = mergeUpdateResult(this._chart.updateSpec(this._spec), result);
|
|
61623
61637
|
return userUpdateOptions
|
|
61624
61638
|
? Object.assign(Object.assign({}, res), userUpdateOptions) : res;
|
|
61625
61639
|
}
|
|
@@ -61852,11 +61866,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61852
61866
|
return this._currentThemeName;
|
|
61853
61867
|
}
|
|
61854
61868
|
setCurrentTheme(name) {
|
|
61869
|
+
var _a;
|
|
61855
61870
|
return __awaiter$7(this, void 0, void 0, function* () {
|
|
61856
61871
|
if (!ThemeManager.themeExist(name)) {
|
|
61857
61872
|
return this;
|
|
61858
61873
|
}
|
|
61859
61874
|
const result = this._setCurrentTheme(name);
|
|
61875
|
+
this._setFontFamilyTheme((_a = this._currentTheme) === null || _a === void 0 ? void 0 : _a.fontFamily);
|
|
61860
61876
|
yield this.updateCustomConfigAndRerender(result, false, {
|
|
61861
61877
|
transformSpec: false,
|
|
61862
61878
|
actionSource: 'setCurrentTheme'
|
|
@@ -61865,10 +61881,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61865
61881
|
});
|
|
61866
61882
|
}
|
|
61867
61883
|
setCurrentThemeSync(name) {
|
|
61884
|
+
var _a;
|
|
61868
61885
|
if (!ThemeManager.themeExist(name)) {
|
|
61869
61886
|
return this;
|
|
61870
61887
|
}
|
|
61871
61888
|
const result = this._setCurrentTheme(name);
|
|
61889
|
+
this._setFontFamilyTheme((_a = this._currentTheme) === null || _a === void 0 ? void 0 : _a.fontFamily);
|
|
61872
61890
|
this.updateCustomConfigAndRerender(result, true, {
|
|
61873
61891
|
transformSpec: false,
|
|
61874
61892
|
actionSource: 'setCurrentTheme'
|
|
@@ -61882,6 +61900,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61882
61900
|
(_a = this._chart) === null || _a === void 0 ? void 0 : _a.setCurrentTheme();
|
|
61883
61901
|
return { change: true, reMake: false };
|
|
61884
61902
|
}
|
|
61903
|
+
_setFontFamilyTheme(fontFamily) {
|
|
61904
|
+
var _a;
|
|
61905
|
+
if (!fontFamily) {
|
|
61906
|
+
return;
|
|
61907
|
+
}
|
|
61908
|
+
(_a = this.getStage()) === null || _a === void 0 ? void 0 : _a.setTheme({ text: { fontFamily } });
|
|
61909
|
+
}
|
|
61885
61910
|
_getTooltipComponent() {
|
|
61886
61911
|
var _a;
|
|
61887
61912
|
const tooltip = (_a = this._chart) === null || _a === void 0 ? void 0 : _a.getComponentsByType(ComponentTypeEnum.tooltip)[0];
|
|
@@ -66504,7 +66529,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
66504
66529
|
registerComponentPlugin(CanvasTooltipHandler);
|
|
66505
66530
|
};
|
|
66506
66531
|
|
|
66507
|
-
const version = "1.11.
|
|
66532
|
+
const version = "1.11.9";
|
|
66508
66533
|
|
|
66509
66534
|
const addVChartProperty = (data, op) => {
|
|
66510
66535
|
const context = op.beforeCall();
|
|
@@ -67287,11 +67312,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67287
67312
|
}
|
|
67288
67313
|
}
|
|
67289
67314
|
getRawDataStatisticsByField(field, isNumeric) {
|
|
67290
|
-
var _a, _b;
|
|
67315
|
+
var _a, _b, _c;
|
|
67291
67316
|
if (!this._rawStatisticsCache) {
|
|
67292
67317
|
this._rawStatisticsCache = {};
|
|
67293
67318
|
}
|
|
67294
|
-
if (!this._rawStatisticsCache[field]
|
|
67319
|
+
if (!this._rawStatisticsCache[field] ||
|
|
67320
|
+
(isNumeric && (isNil$1(this._rawStatisticsCache[field].min) || isNil$1(this._rawStatisticsCache[field].max))) ||
|
|
67321
|
+
(!isNumeric && isNil$1(this._rawStatisticsCache[field].values))) {
|
|
67295
67322
|
const canUseViewStatistics = this._viewDataStatistics &&
|
|
67296
67323
|
(!this._viewDataFilter || this._viewDataFilter.transformsArr.length <= 1) &&
|
|
67297
67324
|
this.getViewData().transformsArr.length <= 1;
|
|
@@ -67311,16 +67338,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67311
67338
|
}
|
|
67312
67339
|
}
|
|
67313
67340
|
else {
|
|
67314
|
-
|
|
67341
|
+
const result = dimensionStatisticsOfSimpleData(this._rawData.latestData, [
|
|
67315
67342
|
{ key: field, operations: isNumeric ? ['min', 'max'] : ['values'] }
|
|
67316
67343
|
])[field];
|
|
67344
|
+
this._rawStatisticsCache[field] = merge$2((_c = this._rawStatisticsCache[field]) !== null && _c !== void 0 ? _c : {}, result);
|
|
67317
67345
|
}
|
|
67318
67346
|
}
|
|
67319
67347
|
}
|
|
67320
|
-
if (isNumeric && (isNil$1(this._rawStatisticsCache[field].min) || isNil$1(this._rawStatisticsCache[field].max))) {
|
|
67321
|
-
this._rawStatisticsCache[field].min = minInArray(this._rawStatisticsCache[field].values);
|
|
67322
|
-
this._rawStatisticsCache[field].max = maxInArray(this._rawStatisticsCache[field].values);
|
|
67323
|
-
}
|
|
67324
67348
|
return this._rawStatisticsCache[field];
|
|
67325
67349
|
}
|
|
67326
67350
|
_statisticViewData() {
|
|
@@ -72250,6 +72274,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
72250
72274
|
const componentCache = {};
|
|
72251
72275
|
this._components.forEach(c => {
|
|
72252
72276
|
var _a, _b;
|
|
72277
|
+
if (c.type === ComponentTypeEnum.label || c.type === ComponentTypeEnum.totalLabel) {
|
|
72278
|
+
return;
|
|
72279
|
+
}
|
|
72253
72280
|
const compSpecKey = c.specKey || c.type;
|
|
72254
72281
|
const cmpSpec = (_a = this._spec[compSpecKey]) !== null && _a !== void 0 ? _a : {};
|
|
72255
72282
|
if (isArray$1(cmpSpec)) {
|
|
@@ -76275,7 +76302,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
76275
76302
|
}
|
|
76276
76303
|
_transformLabelSpec(spec) {
|
|
76277
76304
|
this._addMarkLabelSpec(spec, "bar");
|
|
76278
|
-
this._addMarkLabelSpec(spec, "bar", 'stackLabel');
|
|
76305
|
+
this._addMarkLabelSpec(spec, "bar", 'stackLabel', 'initStackLabelMarkStyle');
|
|
76279
76306
|
}
|
|
76280
76307
|
}
|
|
76281
76308
|
|
|
@@ -76678,6 +76705,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
76678
76705
|
this._labelMark = labelMark;
|
|
76679
76706
|
return;
|
|
76680
76707
|
}
|
|
76708
|
+
}
|
|
76709
|
+
initStackLabelMarkStyle(labelMark) {
|
|
76710
|
+
if (!labelMark) {
|
|
76711
|
+
return;
|
|
76712
|
+
}
|
|
76681
76713
|
this._stackLabelMark = labelMark;
|
|
76682
76714
|
labelMark.skipEncode = true;
|
|
76683
76715
|
labelMark.setRule('stackLabel');
|
|
@@ -79531,15 +79563,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
79531
79563
|
}
|
|
79532
79564
|
onBind() {
|
|
79533
79565
|
const { angle: fromAngle, radius: fromRadius } = this._pointToCoord(this.from);
|
|
79534
|
-
if (!isValidNumber$1(fromAngle * fromRadius)) {
|
|
79535
|
-
this.valid = false;
|
|
79536
|
-
}
|
|
79537
|
-
this._fromAngle = fromAngle;
|
|
79538
|
-
this._fromRadius = fromRadius;
|
|
79539
79566
|
const { angle: toAngle, radius: toRadius } = this._pointToCoord(this.to);
|
|
79540
79567
|
if (!isValidNumber$1(toAngle * toRadius)) {
|
|
79541
79568
|
this.valid = false;
|
|
79542
79569
|
}
|
|
79570
|
+
this._fromAngle = isValidNumber$1(fromAngle) ? fromAngle : toAngle;
|
|
79571
|
+
this._fromRadius = isValidNumber$1(fromRadius) ? fromRadius : toRadius;
|
|
79543
79572
|
this._toAngle = toAngle;
|
|
79544
79573
|
this._toRadius = toRadius;
|
|
79545
79574
|
if (isClose(this._fromAngle, this._toAngle) && isClose(this._fromRadius, this._toRadius)) {
|
|
@@ -79548,6 +79577,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
79548
79577
|
}
|
|
79549
79578
|
onUpdate(end, ratio, out) {
|
|
79550
79579
|
if (this.valid === false) {
|
|
79580
|
+
out.x = this.to.x;
|
|
79581
|
+
out.y = this.to.y;
|
|
79551
79582
|
return;
|
|
79552
79583
|
}
|
|
79553
79584
|
if (end) {
|
|
@@ -86508,20 +86539,21 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
86508
86539
|
}
|
|
86509
86540
|
const isStartGap = "start" === this.options.gapPosition,
|
|
86510
86541
|
isMiddleGap = !isStartGap && "end" !== this.options.gapPosition,
|
|
86511
|
-
getNodeHeight = isNumber$1(this.options.nodeHeight) ? node => this.options.nodeHeight : isFunction$1(this.options.nodeHeight) ? this.options.nodeHeight : forceNodeHeight > 0 ? node => forceNodeHeight : node => Math.max(node.value * ky,
|
|
86542
|
+
getNodeHeight = isNumber$1(this.options.nodeHeight) ? node => this.options.nodeHeight : isFunction$1(this.options.nodeHeight) ? this.options.nodeHeight : forceNodeHeight > 0 ? node => forceNodeHeight : node => Math.max(node.value * ky, 0),
|
|
86512
86543
|
getLinkHeight = isNumber$1(this.options.linkHeight) ? () => this.options.linkHeight : isFunction$1(this.options.linkHeight) ? this.options.linkHeight : (link, sourceNode, sourceNodeHeight) => Math.max(sourceNode.value ? sourceNodeHeight * linkClampe(link.value / sourceNode.value) : 0, minLinkHeight, 0);
|
|
86513
86544
|
for (let i = 0, columnCount = columns.length; i < columnCount; i++) {
|
|
86514
86545
|
const nodes = columns[i];
|
|
86515
86546
|
if (!nodes || !nodes.length) continue;
|
|
86516
86547
|
let y = this._viewBox.y0,
|
|
86517
86548
|
gapY = 0,
|
|
86518
|
-
nodeHeight = 0
|
|
86549
|
+
nodeHeight = 0,
|
|
86550
|
+
calculatedNodeHeight = 0;
|
|
86519
86551
|
for (let j = 0, len = nodes.length; j < len; j++) {
|
|
86520
86552
|
const node = nodes[j];
|
|
86521
|
-
gapY = getGapY(node), isStartGap && (y += gapY),
|
|
86553
|
+
gapY = getGapY(node), isStartGap && (y += gapY), calculatedNodeHeight = getNodeHeight(node), nodeHeight = Math.max(calculatedNodeHeight, minNodeHeight), node.y0 = y, node.y1 = y + nodeHeight, y = isStartGap ? node.y1 : node.y1 + gapY;
|
|
86522
86554
|
for (let k = 0, linkLen = node.sourceLinks.length; k < linkLen; k++) {
|
|
86523
86555
|
const link = node.sourceLinks[k];
|
|
86524
|
-
link.thickness = getLinkHeight(link, node,
|
|
86556
|
+
link.thickness = getLinkHeight(link, node, calculatedNodeHeight);
|
|
86525
86557
|
}
|
|
86526
86558
|
}
|
|
86527
86559
|
let deltaY = this._viewBox.y1 - y + (isMiddleGap ? gapY : 0);
|
|
@@ -93581,8 +93613,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93581
93613
|
return false;
|
|
93582
93614
|
}
|
|
93583
93615
|
_initTheme(spec, chartSpec) {
|
|
93616
|
+
var _a;
|
|
93584
93617
|
const { spec: newSpec, theme } = super._initTheme(spec, chartSpec);
|
|
93585
93618
|
newSpec.style = mergeSpec({}, this._theme, newSpec.style);
|
|
93619
|
+
newSpec.offset = mergeSpec({}, theme.offset, spec.offset);
|
|
93620
|
+
newSpec.transitionDuration = (_a = spec.transitionDuration) !== null && _a !== void 0 ? _a : theme.transitionDuration;
|
|
93586
93621
|
return { spec: newSpec, theme };
|
|
93587
93622
|
}
|
|
93588
93623
|
_transformSpecAfterMergingTheme(spec, chartSpec, chartSpecInfo) {
|