@visactor/vchart 1.11.4 → 1.11.5
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 +112 -61
- package/build/index.js +112 -61
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/component/tooltip/interface/theme.d.ts +1 -0
- package/cjs/component/tooltip/interface/theme.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/data/transforms/waterfall.js +17 -6
- package/cjs/data/transforms/waterfall.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/dom/interface.d.ts +1 -0
- package/cjs/plugin/components/tooltip-handler/dom/interface.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/dom/model/content-model.d.ts +1 -3
- package/cjs/plugin/components/tooltip-handler/dom/model/content-model.js +9 -14
- package/cjs/plugin/components/tooltip-handler/dom/model/content-model.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/dom/model/shape-model.js +7 -11
- package/cjs/plugin/components/tooltip-handler/dom/model/shape-model.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/dom/model/title-model.js +8 -6
- package/cjs/plugin/components/tooltip-handler/dom/model/title-model.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/dom/utils/style.js +6 -5
- package/cjs/plugin/components/tooltip-handler/dom/utils/style.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/interface/style.d.ts +1 -0
- package/cjs/plugin/components/tooltip-handler/interface/style.js.map +1 -1
- package/cjs/plugin/components/tooltip-handler/utils/attribute.js +8 -3
- package/cjs/plugin/components/tooltip-handler/utils/attribute.js.map +1 -1
- package/cjs/theme/builtin/common/component/legend/discrete-legend.js +24 -0
- package/cjs/theme/builtin/common/component/legend/discrete-legend.js.map +1 -1
- package/cjs/theme/builtin/common/component/tooltip.js +0 -2
- package/cjs/theme/builtin/common/component/tooltip.js.map +1 -1
- package/cjs/theme/builtin/dark/color-scheme.js +4 -1
- package/cjs/theme/builtin/dark/color-scheme.js.map +1 -1
- package/cjs/theme/builtin/light/color-scheme.js +4 -1
- package/cjs/theme/builtin/light/color-scheme.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/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/data/transforms/waterfall.js +17 -6
- package/esm/data/transforms/waterfall.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/dom/interface.d.ts +1 -0
- package/esm/plugin/components/tooltip-handler/dom/interface.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/dom/model/content-model.d.ts +1 -3
- package/esm/plugin/components/tooltip-handler/dom/model/content-model.js +9 -14
- package/esm/plugin/components/tooltip-handler/dom/model/content-model.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/dom/model/shape-model.js +5 -9
- package/esm/plugin/components/tooltip-handler/dom/model/shape-model.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/dom/model/title-model.js +8 -6
- package/esm/plugin/components/tooltip-handler/dom/model/title-model.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/dom/utils/style.js +5 -4
- package/esm/plugin/components/tooltip-handler/dom/utils/style.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/interface/style.d.ts +1 -0
- package/esm/plugin/components/tooltip-handler/interface/style.js.map +1 -1
- package/esm/plugin/components/tooltip-handler/utils/attribute.js +7 -2
- package/esm/plugin/components/tooltip-handler/utils/attribute.js.map +1 -1
- package/esm/theme/builtin/common/component/legend/discrete-legend.js +24 -0
- package/esm/theme/builtin/common/component/legend/discrete-legend.js.map +1 -1
- package/esm/theme/builtin/common/component/tooltip.js +0 -2
- package/esm/theme/builtin/common/component/tooltip.js.map +1 -1
- package/esm/theme/builtin/dark/color-scheme.js +4 -1
- package/esm/theme/builtin/dark/color-scheme.js.map +1 -1
- package/esm/theme/builtin/light/color-scheme.js +4 -1
- package/esm/theme/builtin/light/color-scheme.js.map +1 -1
- package/package.json +5 -5
package/build/index.js
CHANGED
|
@@ -52795,7 +52795,10 @@
|
|
|
52795
52795
|
dangerColor: '#e33232',
|
|
52796
52796
|
warningColor: '#ffc528',
|
|
52797
52797
|
successColor: '#07a35a',
|
|
52798
|
-
infoColor: '#3073f2'
|
|
52798
|
+
infoColor: '#3073f2',
|
|
52799
|
+
discreteLegendPagerTextColor: 'rgb(51, 51, 51)',
|
|
52800
|
+
discreteLegendPagerHandlerColor: 'rgb(47, 69, 84)',
|
|
52801
|
+
discreteLegendPagerHandlerDisableColor: 'rgb(170, 170, 170)'
|
|
52799
52802
|
}
|
|
52800
52803
|
}
|
|
52801
52804
|
};
|
|
@@ -54007,6 +54010,21 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54007
54010
|
},
|
|
54008
54011
|
space: 12
|
|
54009
54012
|
},
|
|
54013
|
+
pager: {
|
|
54014
|
+
textStyle: {
|
|
54015
|
+
fill: { type: 'palette', key: 'discreteLegendPagerTextColor' }
|
|
54016
|
+
},
|
|
54017
|
+
handler: {
|
|
54018
|
+
style: {
|
|
54019
|
+
fill: { type: 'palette', key: 'discreteLegendPagerHandlerColor' }
|
|
54020
|
+
},
|
|
54021
|
+
state: {
|
|
54022
|
+
disable: {
|
|
54023
|
+
fill: { type: 'palette', key: 'discreteLegendPagerHandlerDisableColor' }
|
|
54024
|
+
}
|
|
54025
|
+
}
|
|
54026
|
+
}
|
|
54027
|
+
},
|
|
54010
54028
|
item: {
|
|
54011
54029
|
visible: true,
|
|
54012
54030
|
spaceCol: 10,
|
|
@@ -54362,7 +54380,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54362
54380
|
lineHeight: { type: 'token', key: 'l4LineHeight' },
|
|
54363
54381
|
fontColor: { type: 'palette', key: 'primaryFontColor' },
|
|
54364
54382
|
fontWeight: 'bold',
|
|
54365
|
-
textAlign: 'left',
|
|
54366
54383
|
textBaseline: 'middle',
|
|
54367
54384
|
spacing: 0
|
|
54368
54385
|
},
|
|
@@ -54374,7 +54391,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54374
54391
|
fontSize: { type: 'token', key: 'l4FontSize' },
|
|
54375
54392
|
lineHeight: { type: 'token', key: 'l4LineHeight' },
|
|
54376
54393
|
fontColor: { type: 'palette', key: 'secondaryFontColor' },
|
|
54377
|
-
textAlign: 'left',
|
|
54378
54394
|
textBaseline: 'middle',
|
|
54379
54395
|
spacing: 26
|
|
54380
54396
|
},
|
|
@@ -54552,7 +54568,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
54552
54568
|
dangerColor: '#eb4b4b',
|
|
54553
54569
|
warningColor: '#f0bd30',
|
|
54554
54570
|
successColor: '#14b267',
|
|
54555
|
-
infoColor: '#4284ff'
|
|
54571
|
+
infoColor: '#4284ff',
|
|
54572
|
+
discreteLegendPagerTextColor: '#BBBDC3',
|
|
54573
|
+
discreteLegendPagerHandlerColor: '#BBBDC3',
|
|
54574
|
+
discreteLegendPagerHandlerDisableColor: '#55595F'
|
|
54556
54575
|
}
|
|
54557
54576
|
}
|
|
54558
54577
|
};
|
|
@@ -63600,11 +63619,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
63600
63619
|
const getTooltipAttributes = (actualTooltip, spec, globalTheme) => {
|
|
63601
63620
|
var _a, _b, _c, _d, _e;
|
|
63602
63621
|
const { style = {}, enterable, transitionDuration } = spec;
|
|
63603
|
-
const { panel = {}, titleLabel, shape, keyLabel, valueLabel, spaceRow: commonSpaceRow, maxContentHeight } = style;
|
|
63622
|
+
const { panel = {}, titleLabel, shape, keyLabel, valueLabel, spaceRow: commonSpaceRow, maxContentHeight, align } = style;
|
|
63604
63623
|
const padding = normalizePadding$1(panel.padding);
|
|
63605
63624
|
const paddingSpec = normalizeLayoutPaddingSpec(panel.padding);
|
|
63606
|
-
const titleStyle = getTextAttributes(titleLabel, globalTheme);
|
|
63607
|
-
const keyStyle = getTextAttributes(keyLabel, globalTheme);
|
|
63625
|
+
const titleStyle = getTextAttributes(Object.assign({ textAlign: align === 'right' ? 'right' : 'left' }, titleLabel), globalTheme);
|
|
63626
|
+
const keyStyle = getTextAttributes(Object.assign({ textAlign: align === 'right' ? 'right' : 'left' }, keyLabel), globalTheme);
|
|
63608
63627
|
const valueStyle = getTextAttributes(valueLabel, globalTheme);
|
|
63609
63628
|
const shapeStyle = {
|
|
63610
63629
|
fill: true,
|
|
@@ -63631,7 +63650,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
63631
63650
|
valueWidth: 0,
|
|
63632
63651
|
maxContentHeight,
|
|
63633
63652
|
enterable,
|
|
63634
|
-
transitionDuration
|
|
63653
|
+
transitionDuration,
|
|
63654
|
+
align
|
|
63635
63655
|
};
|
|
63636
63656
|
const { title = {}, content = [] } = actualTooltip;
|
|
63637
63657
|
let panelWidth = paddingSpec.left + paddingSpec.right;
|
|
@@ -65376,7 +65396,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65376
65396
|
const DEFAULT_VALUE_SPACING = 0;
|
|
65377
65397
|
function getDomStyles(attributes) {
|
|
65378
65398
|
var _a, _b, _c;
|
|
65379
|
-
const { panel = {}, title: titleAttribute, content: contentAttribute, titleStyle = {}, contentStyle = {}, padding, keyWidth, valueWidth, enterable, transitionDuration, panelDomHeight = 0 } = attributes !== null && attributes !== void 0 ? attributes : {};
|
|
65399
|
+
const { panel = {}, title: titleAttribute, content: contentAttribute, titleStyle = {}, contentStyle = {}, padding, keyWidth, valueWidth, enterable, transitionDuration, panelDomHeight = 0, align = 'left' } = attributes !== null && attributes !== void 0 ? attributes : {};
|
|
65380
65400
|
const { fill: backgroundColor, shadow, shadowBlur, shadowColor, shadowOffsetX, shadowOffsetY, shadowSpread, cornerRadius, stroke: strokeColor, lineWidth = 0, width = 0 } = panel;
|
|
65381
65401
|
const { value: title = {} } = titleStyle;
|
|
65382
65402
|
const { shape = {}, key = {}, value = {} } = contentStyle;
|
|
@@ -65384,7 +65404,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65384
65404
|
const keyStyle = getLabelStyle(key);
|
|
65385
65405
|
const valueStyle = getLabelStyle(value);
|
|
65386
65406
|
const { bottom, left, right, top } = normalizeLayoutPaddingSpec(padding);
|
|
65407
|
+
const marginKey = align === 'right' ? 'marginLeft' : 'marginRight';
|
|
65387
65408
|
const styles = {
|
|
65409
|
+
align,
|
|
65388
65410
|
panel: {
|
|
65389
65411
|
width: getPixelPropertyStr(width + lineWidth * 2),
|
|
65390
65412
|
minHeight: getPixelPropertyStr(panelDomHeight + lineWidth * 2),
|
|
@@ -65413,19 +65435,19 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65413
65435
|
marginBottom: i < contentAttribute.length - 1 ? getPixelPropertyStr(spaceRow) : '0px'
|
|
65414
65436
|
})),
|
|
65415
65437
|
width: getPixelPropertyStr(shape.size),
|
|
65416
|
-
|
|
65438
|
+
[marginKey]: getPixelPropertyStr((_a = shape.spacing) !== null && _a !== void 0 ? _a : DEFAULT_SHAPE_SPACING)
|
|
65417
65439
|
},
|
|
65418
65440
|
keyColumn: {
|
|
65419
65441
|
common: keyStyle,
|
|
65420
65442
|
items: contentAttribute === null || contentAttribute === void 0 ? void 0 : contentAttribute.map(({ key, spaceRow }, i) => (Object.assign(Object.assign(Object.assign({ marginTop: '0px', marginBottom: i < contentAttribute.length - 1 ? getPixelPropertyStr(spaceRow) : '0px' }, keyStyle), getLabelStyle(key)), ((key === null || key === void 0 ? void 0 : key.multiLine) ? { width: getPixelPropertyStr(Math.ceil(key.width)) } : undefined)))),
|
|
65421
65443
|
width: getPixelPropertyStr(keyWidth),
|
|
65422
|
-
|
|
65444
|
+
[marginKey]: getPixelPropertyStr((_b = key.spacing) !== null && _b !== void 0 ? _b : DEFAULT_KEY_SPACING)
|
|
65423
65445
|
},
|
|
65424
65446
|
valueColumn: {
|
|
65425
65447
|
common: valueStyle,
|
|
65426
65448
|
items: contentAttribute === null || contentAttribute === void 0 ? void 0 : contentAttribute.map(({ value, spaceRow }, i) => (Object.assign(Object.assign(Object.assign({ marginTop: '0px', marginBottom: i < contentAttribute.length - 1 ? getPixelPropertyStr(spaceRow) : '0px' }, valueStyle), getLabelStyle(value)), ((value === null || value === void 0 ? void 0 : value.multiLine) ? { width: getPixelPropertyStr(Math.ceil(value.width)) } : undefined)))),
|
|
65427
65449
|
width: getPixelPropertyStr(valueWidth),
|
|
65428
|
-
|
|
65450
|
+
[marginKey]: getPixelPropertyStr((_c = value.spacing) !== null && _c !== void 0 ? _c : DEFAULT_VALUE_SPACING)
|
|
65429
65451
|
}
|
|
65430
65452
|
};
|
|
65431
65453
|
return styles;
|
|
@@ -65632,11 +65654,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65632
65654
|
this._svgHtmlCache = '';
|
|
65633
65655
|
}
|
|
65634
65656
|
}
|
|
65635
|
-
const builtInShape = {
|
|
65636
|
-
star: 'M0 -1L0.22451398828979266 -0.3090169943749474L0.9510565162951535 -0.30901699437494745L0.3632712640026804 0.1180339887498948L0.5877852522924732 0.8090169943749473L8.326672684688674e-17 0.3819660112501051L-0.587785252292473 0.8090169943749476L-0.3632712640026804 0.11803398874989487L-0.9510565162951536 -0.30901699437494723L-0.22451398828979274 -0.30901699437494734Z'
|
|
65637
|
-
};
|
|
65638
65657
|
function getSvgHtml(option, valueToHtml) {
|
|
65639
|
-
var _a, _b, _c, _d, _e, _f
|
|
65658
|
+
var _a, _b, _c, _d, _e, _f;
|
|
65640
65659
|
if (!(option === null || option === void 0 ? void 0 : option.hasShape) || !option.symbolType) {
|
|
65641
65660
|
return '';
|
|
65642
65661
|
}
|
|
@@ -65647,7 +65666,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65647
65666
|
const getStroke = () => (stroke ? valueToHtml(stroke) : fillString);
|
|
65648
65667
|
const sizeNumber = pixelPropertyStrToNumber(size);
|
|
65649
65668
|
const createSymbol = (symbolType) => new Symbol$1({ symbolType, size: sizeNumber, fill: true });
|
|
65650
|
-
let symbol = createSymbol(
|
|
65669
|
+
let symbol = createSymbol(symbolType);
|
|
65651
65670
|
const parsedPath = symbol.getParsedPath();
|
|
65652
65671
|
if (!parsedPath.path) {
|
|
65653
65672
|
symbol = createSymbol(parsedPath.pathStr);
|
|
@@ -65674,9 +65693,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65674
65693
|
</svg>`;
|
|
65675
65694
|
}
|
|
65676
65695
|
if (isObject$2(fill)) {
|
|
65677
|
-
fillString = (
|
|
65696
|
+
fillString = (_a = 'gradientColor' + option.index) !== null && _a !== void 0 ? _a : '';
|
|
65678
65697
|
let gradient = '';
|
|
65679
|
-
const stops = ((
|
|
65698
|
+
const stops = ((_b = fill.stops) !== null && _b !== void 0 ? _b : [])
|
|
65680
65699
|
.map(s => `<stop offset="${valueToHtml(s.offset.toString())}" stop-color="${valueToHtml(s.color)}"/>`)
|
|
65681
65700
|
.join('');
|
|
65682
65701
|
if (fill.gradient === 'radial') {
|
|
@@ -65685,7 +65704,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65685
65704
|
</radialGradient>`;
|
|
65686
65705
|
}
|
|
65687
65706
|
else if (fill.gradient === 'linear') {
|
|
65688
|
-
gradient = `<linearGradient id="${fillString}" x1="${((
|
|
65707
|
+
gradient = `<linearGradient id="${fillString}" x1="${((_c = fill.x0) !== null && _c !== void 0 ? _c : 0) * 100}%" y1="${((_d = fill.y0) !== null && _d !== void 0 ? _d : 0) * 100}%" x2="${((_e = fill.x1) !== null && _e !== void 0 ? _e : 0) * 100}%" y2="${((_f = fill.y1) !== null && _f !== void 0 ? _f : 0) * 100}%">
|
|
65689
65708
|
${stops}
|
|
65690
65709
|
</linearGradient>`;
|
|
65691
65710
|
}
|
|
@@ -65889,33 +65908,35 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65889
65908
|
if (!this.product) {
|
|
65890
65909
|
this.product = this.createElement('div', ['container-box']);
|
|
65891
65910
|
}
|
|
65892
|
-
|
|
65893
|
-
|
|
65894
|
-
|
|
65895
|
-
|
|
65896
|
-
|
|
65911
|
+
const { align } = this._option.getTooltipAttributes();
|
|
65912
|
+
if (align === 'right') {
|
|
65913
|
+
if (!this.valueBox) {
|
|
65914
|
+
this.valueBox = this._initBox('value-box', 0);
|
|
65915
|
+
}
|
|
65916
|
+
if (!this.keyBox) {
|
|
65917
|
+
this.keyBox = this._initBox('key-box', 1);
|
|
65918
|
+
}
|
|
65919
|
+
if (!this.shapeBox) {
|
|
65920
|
+
this.shapeBox = this._initBox('shape-box', 2);
|
|
65921
|
+
}
|
|
65897
65922
|
}
|
|
65898
|
-
|
|
65899
|
-
this.
|
|
65923
|
+
else {
|
|
65924
|
+
if (!this.shapeBox) {
|
|
65925
|
+
this.shapeBox = this._initBox('shape-box', 0);
|
|
65926
|
+
}
|
|
65927
|
+
if (!this.keyBox) {
|
|
65928
|
+
this.keyBox = this._initBox('key-box', 1);
|
|
65929
|
+
}
|
|
65930
|
+
if (!this.valueBox) {
|
|
65931
|
+
this.valueBox = this._initBox('value-box', 2);
|
|
65932
|
+
}
|
|
65900
65933
|
}
|
|
65901
65934
|
}
|
|
65902
|
-
|
|
65903
|
-
const
|
|
65904
|
-
|
|
65905
|
-
this.
|
|
65906
|
-
|
|
65907
|
-
}
|
|
65908
|
-
_initKeyBox() {
|
|
65909
|
-
const keyBox = new ContentColumnModel(this.product, this._option, 'key-box', 1);
|
|
65910
|
-
keyBox.init();
|
|
65911
|
-
this.keyBox = keyBox;
|
|
65912
|
-
this.children[keyBox.childIndex] = keyBox;
|
|
65913
|
-
}
|
|
65914
|
-
_initValueBox() {
|
|
65915
|
-
const valueBox = new ContentColumnModel(this.product, this._option, 'value-box', 2);
|
|
65916
|
-
valueBox.init();
|
|
65917
|
-
this.valueBox = valueBox;
|
|
65918
|
-
this.children[valueBox.childIndex] = valueBox;
|
|
65935
|
+
_initBox(className, index) {
|
|
65936
|
+
const box = new ContentColumnModel(this.product, this._option, className, index);
|
|
65937
|
+
box.init();
|
|
65938
|
+
this.children[box.childIndex] = box;
|
|
65939
|
+
return box;
|
|
65919
65940
|
}
|
|
65920
65941
|
setStyle(style) {
|
|
65921
65942
|
super.setStyle(mergeSpec(this._getContentContainerStyle(), style));
|
|
@@ -65963,21 +65984,25 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65963
65984
|
if (!this.product) {
|
|
65964
65985
|
this.product = this.createElement('h2');
|
|
65965
65986
|
}
|
|
65987
|
+
const { align } = this._option.getTooltipAttributes();
|
|
65988
|
+
if (align === 'right' && !this.textSpan) {
|
|
65989
|
+
this._initTextSpan(0);
|
|
65990
|
+
}
|
|
65966
65991
|
const { title } = tooltipActual;
|
|
65967
65992
|
if ((title === null || title === void 0 ? void 0 : title.hasShape) && (title === null || title === void 0 ? void 0 : title.shapeType)) {
|
|
65968
65993
|
if (!this.shape) {
|
|
65969
|
-
this._initShape();
|
|
65994
|
+
this._initShape(align === 'right' ? 1 : 0);
|
|
65970
65995
|
}
|
|
65971
65996
|
}
|
|
65972
65997
|
else if (this.shape) {
|
|
65973
65998
|
this._releaseShape();
|
|
65974
65999
|
}
|
|
65975
|
-
if (!this.textSpan) {
|
|
65976
|
-
this._initTextSpan();
|
|
66000
|
+
if (align !== 'right' && !this.textSpan) {
|
|
66001
|
+
this._initTextSpan(1);
|
|
65977
66002
|
}
|
|
65978
66003
|
}
|
|
65979
|
-
_initShape() {
|
|
65980
|
-
const shape = new ShapeModel(this.product, this._option,
|
|
66004
|
+
_initShape(index = 0) {
|
|
66005
|
+
const shape = new ShapeModel(this.product, this._option, index);
|
|
65981
66006
|
shape.init();
|
|
65982
66007
|
this.shape = shape;
|
|
65983
66008
|
this.children[shape.childIndex] = shape;
|
|
@@ -65990,8 +66015,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65990
66015
|
delete this.children[this.shape.childIndex];
|
|
65991
66016
|
this.shape = null;
|
|
65992
66017
|
}
|
|
65993
|
-
_initTextSpan() {
|
|
65994
|
-
const textSpan = new TextModel(this.product, this._option,
|
|
66018
|
+
_initTextSpan(index = 1) {
|
|
66019
|
+
const textSpan = new TextModel(this.product, this._option, index);
|
|
65995
66020
|
textSpan.init();
|
|
65996
66021
|
this.textSpan = textSpan;
|
|
65997
66022
|
this.children[textSpan.childIndex] = textSpan;
|
|
@@ -66372,7 +66397,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
66372
66397
|
registerComponentPlugin(CanvasTooltipHandler);
|
|
66373
66398
|
};
|
|
66374
66399
|
|
|
66375
|
-
const version = "1.11.
|
|
66400
|
+
const version = "1.11.5";
|
|
66376
66401
|
|
|
66377
66402
|
const addVChartProperty = (data, op) => {
|
|
66378
66403
|
const context = op.beforeCall();
|
|
@@ -75782,7 +75807,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
75782
75807
|
const totalData = [];
|
|
75783
75808
|
const { dimensionValues, dimensionData } = groupData().latestData;
|
|
75784
75809
|
const indexValues = Array.from(dimensionValues[indexField]);
|
|
75785
|
-
let temp = {
|
|
75810
|
+
let temp = {
|
|
75811
|
+
start: 0,
|
|
75812
|
+
end: 0,
|
|
75813
|
+
positive: 0,
|
|
75814
|
+
negative: 0,
|
|
75815
|
+
lastIndex: null
|
|
75816
|
+
};
|
|
75786
75817
|
indexValues.forEach((key, index) => {
|
|
75787
75818
|
const total = {
|
|
75788
75819
|
start: temp.end,
|
|
@@ -75790,7 +75821,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
75790
75821
|
lastIndex: temp.lastIndex,
|
|
75791
75822
|
lastEnd: temp.end,
|
|
75792
75823
|
index: key,
|
|
75793
|
-
isTotal: false
|
|
75824
|
+
isTotal: false,
|
|
75825
|
+
positive: temp.end,
|
|
75826
|
+
negative: temp.end
|
|
75794
75827
|
};
|
|
75795
75828
|
const indexData = dimensionData[key];
|
|
75796
75829
|
indexData === null || indexData === void 0 ? void 0 : indexData.forEach((d, i) => {
|
|
@@ -75852,12 +75885,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
75852
75885
|
let { start, end } = getTotalStartEnd(totalConfigData, total, totalData, temp, totalSpec);
|
|
75853
75886
|
total.start = start;
|
|
75854
75887
|
total.end = end;
|
|
75888
|
+
let positive = start;
|
|
75889
|
+
let navigate = start;
|
|
75855
75890
|
let valueTemp = end - start;
|
|
75856
75891
|
_normalTemp.forEach(d => {
|
|
75857
|
-
|
|
75858
|
-
|
|
75859
|
-
|
|
75860
|
-
|
|
75892
|
+
const value = +d[valueField];
|
|
75893
|
+
if (value >= 0) {
|
|
75894
|
+
d[startAs] = +positive;
|
|
75895
|
+
positive = precisionAdd(positive, value);
|
|
75896
|
+
}
|
|
75897
|
+
else {
|
|
75898
|
+
d[startAs] = +navigate;
|
|
75899
|
+
navigate = precisionAdd(navigate, value);
|
|
75900
|
+
}
|
|
75901
|
+
d[endAs] = precisionAdd(d[startAs], value);
|
|
75902
|
+
start = precisionAdd(start, value);
|
|
75903
|
+
valueTemp = precisionSub(valueTemp, value);
|
|
75861
75904
|
});
|
|
75862
75905
|
_totalTemp.forEach(d => {
|
|
75863
75906
|
d[startAs] = +start;
|
|
@@ -75891,9 +75934,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
75891
75934
|
}
|
|
75892
75935
|
}
|
|
75893
75936
|
if (!isTotalTag) {
|
|
75894
|
-
|
|
75895
|
-
|
|
75896
|
-
|
|
75937
|
+
const value = +d[valueField];
|
|
75938
|
+
if (value >= 0) {
|
|
75939
|
+
d[startAs] = +total.positive;
|
|
75940
|
+
total.positive = precisionAdd(total.positive, value);
|
|
75941
|
+
}
|
|
75942
|
+
else {
|
|
75943
|
+
d[startAs] = +total.negative;
|
|
75944
|
+
total.negative = precisionAdd(total.negative, value);
|
|
75945
|
+
}
|
|
75946
|
+
d[endAs] = precisionAdd(d[startAs], value);
|
|
75947
|
+
total.end = precisionAdd(total.end, value);
|
|
75897
75948
|
}
|
|
75898
75949
|
total.isTotal = isTotalTag;
|
|
75899
75950
|
if (isNil$1(seriesField) || seriesField === WaterfallDefaultSeriesField) {
|