@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.es.js
CHANGED
|
@@ -52789,7 +52789,10 @@ const colorScheme$1 = {
|
|
|
52789
52789
|
dangerColor: '#e33232',
|
|
52790
52790
|
warningColor: '#ffc528',
|
|
52791
52791
|
successColor: '#07a35a',
|
|
52792
|
-
infoColor: '#3073f2'
|
|
52792
|
+
infoColor: '#3073f2',
|
|
52793
|
+
discreteLegendPagerTextColor: 'rgb(51, 51, 51)',
|
|
52794
|
+
discreteLegendPagerHandlerColor: 'rgb(47, 69, 84)',
|
|
52795
|
+
discreteLegendPagerHandlerDisableColor: 'rgb(170, 170, 170)'
|
|
52793
52796
|
}
|
|
52794
52797
|
}
|
|
52795
52798
|
};
|
|
@@ -54001,6 +54004,21 @@ const discreteLegend = {
|
|
|
54001
54004
|
},
|
|
54002
54005
|
space: 12
|
|
54003
54006
|
},
|
|
54007
|
+
pager: {
|
|
54008
|
+
textStyle: {
|
|
54009
|
+
fill: { type: 'palette', key: 'discreteLegendPagerTextColor' }
|
|
54010
|
+
},
|
|
54011
|
+
handler: {
|
|
54012
|
+
style: {
|
|
54013
|
+
fill: { type: 'palette', key: 'discreteLegendPagerHandlerColor' }
|
|
54014
|
+
},
|
|
54015
|
+
state: {
|
|
54016
|
+
disable: {
|
|
54017
|
+
fill: { type: 'palette', key: 'discreteLegendPagerHandlerDisableColor' }
|
|
54018
|
+
}
|
|
54019
|
+
}
|
|
54020
|
+
}
|
|
54021
|
+
},
|
|
54004
54022
|
item: {
|
|
54005
54023
|
visible: true,
|
|
54006
54024
|
spaceCol: 10,
|
|
@@ -54356,7 +54374,6 @@ const tooltip = {
|
|
|
54356
54374
|
lineHeight: { type: 'token', key: 'l4LineHeight' },
|
|
54357
54375
|
fontColor: { type: 'palette', key: 'primaryFontColor' },
|
|
54358
54376
|
fontWeight: 'bold',
|
|
54359
|
-
textAlign: 'left',
|
|
54360
54377
|
textBaseline: 'middle',
|
|
54361
54378
|
spacing: 0
|
|
54362
54379
|
},
|
|
@@ -54368,7 +54385,6 @@ const tooltip = {
|
|
|
54368
54385
|
fontSize: { type: 'token', key: 'l4FontSize' },
|
|
54369
54386
|
lineHeight: { type: 'token', key: 'l4LineHeight' },
|
|
54370
54387
|
fontColor: { type: 'palette', key: 'secondaryFontColor' },
|
|
54371
|
-
textAlign: 'left',
|
|
54372
54388
|
textBaseline: 'middle',
|
|
54373
54389
|
spacing: 26
|
|
54374
54390
|
},
|
|
@@ -54546,7 +54562,10 @@ const colorScheme = {
|
|
|
54546
54562
|
dangerColor: '#eb4b4b',
|
|
54547
54563
|
warningColor: '#f0bd30',
|
|
54548
54564
|
successColor: '#14b267',
|
|
54549
|
-
infoColor: '#4284ff'
|
|
54565
|
+
infoColor: '#4284ff',
|
|
54566
|
+
discreteLegendPagerTextColor: '#BBBDC3',
|
|
54567
|
+
discreteLegendPagerHandlerColor: '#BBBDC3',
|
|
54568
|
+
discreteLegendPagerHandlerDisableColor: '#55595F'
|
|
54550
54569
|
}
|
|
54551
54570
|
}
|
|
54552
54571
|
};
|
|
@@ -63594,11 +63613,11 @@ const getPanelAttributes = (style) => {
|
|
|
63594
63613
|
const getTooltipAttributes = (actualTooltip, spec, globalTheme) => {
|
|
63595
63614
|
var _a, _b, _c, _d, _e;
|
|
63596
63615
|
const { style = {}, enterable, transitionDuration } = spec;
|
|
63597
|
-
const { panel = {}, titleLabel, shape, keyLabel, valueLabel, spaceRow: commonSpaceRow, maxContentHeight } = style;
|
|
63616
|
+
const { panel = {}, titleLabel, shape, keyLabel, valueLabel, spaceRow: commonSpaceRow, maxContentHeight, align } = style;
|
|
63598
63617
|
const padding = normalizePadding$1(panel.padding);
|
|
63599
63618
|
const paddingSpec = normalizeLayoutPaddingSpec(panel.padding);
|
|
63600
|
-
const titleStyle = getTextAttributes(titleLabel, globalTheme);
|
|
63601
|
-
const keyStyle = getTextAttributes(keyLabel, globalTheme);
|
|
63619
|
+
const titleStyle = getTextAttributes(Object.assign({ textAlign: align === 'right' ? 'right' : 'left' }, titleLabel), globalTheme);
|
|
63620
|
+
const keyStyle = getTextAttributes(Object.assign({ textAlign: align === 'right' ? 'right' : 'left' }, keyLabel), globalTheme);
|
|
63602
63621
|
const valueStyle = getTextAttributes(valueLabel, globalTheme);
|
|
63603
63622
|
const shapeStyle = {
|
|
63604
63623
|
fill: true,
|
|
@@ -63625,7 +63644,8 @@ const getTooltipAttributes = (actualTooltip, spec, globalTheme) => {
|
|
|
63625
63644
|
valueWidth: 0,
|
|
63626
63645
|
maxContentHeight,
|
|
63627
63646
|
enterable,
|
|
63628
|
-
transitionDuration
|
|
63647
|
+
transitionDuration,
|
|
63648
|
+
align
|
|
63629
63649
|
};
|
|
63630
63650
|
const { title = {}, content = [] } = actualTooltip;
|
|
63631
63651
|
let panelWidth = paddingSpec.left + paddingSpec.right;
|
|
@@ -65370,7 +65390,7 @@ const DEFAULT_KEY_SPACING = 26;
|
|
|
65370
65390
|
const DEFAULT_VALUE_SPACING = 0;
|
|
65371
65391
|
function getDomStyles(attributes) {
|
|
65372
65392
|
var _a, _b, _c;
|
|
65373
|
-
const { panel = {}, title: titleAttribute, content: contentAttribute, titleStyle = {}, contentStyle = {}, padding, keyWidth, valueWidth, enterable, transitionDuration, panelDomHeight = 0 } = attributes !== null && attributes !== void 0 ? attributes : {};
|
|
65393
|
+
const { panel = {}, title: titleAttribute, content: contentAttribute, titleStyle = {}, contentStyle = {}, padding, keyWidth, valueWidth, enterable, transitionDuration, panelDomHeight = 0, align = 'left' } = attributes !== null && attributes !== void 0 ? attributes : {};
|
|
65374
65394
|
const { fill: backgroundColor, shadow, shadowBlur, shadowColor, shadowOffsetX, shadowOffsetY, shadowSpread, cornerRadius, stroke: strokeColor, lineWidth = 0, width = 0 } = panel;
|
|
65375
65395
|
const { value: title = {} } = titleStyle;
|
|
65376
65396
|
const { shape = {}, key = {}, value = {} } = contentStyle;
|
|
@@ -65378,7 +65398,9 @@ function getDomStyles(attributes) {
|
|
|
65378
65398
|
const keyStyle = getLabelStyle(key);
|
|
65379
65399
|
const valueStyle = getLabelStyle(value);
|
|
65380
65400
|
const { bottom, left, right, top } = normalizeLayoutPaddingSpec(padding);
|
|
65401
|
+
const marginKey = align === 'right' ? 'marginLeft' : 'marginRight';
|
|
65381
65402
|
const styles = {
|
|
65403
|
+
align,
|
|
65382
65404
|
panel: {
|
|
65383
65405
|
width: getPixelPropertyStr(width + lineWidth * 2),
|
|
65384
65406
|
minHeight: getPixelPropertyStr(panelDomHeight + lineWidth * 2),
|
|
@@ -65407,19 +65429,19 @@ function getDomStyles(attributes) {
|
|
|
65407
65429
|
marginBottom: i < contentAttribute.length - 1 ? getPixelPropertyStr(spaceRow) : '0px'
|
|
65408
65430
|
})),
|
|
65409
65431
|
width: getPixelPropertyStr(shape.size),
|
|
65410
|
-
|
|
65432
|
+
[marginKey]: getPixelPropertyStr((_a = shape.spacing) !== null && _a !== void 0 ? _a : DEFAULT_SHAPE_SPACING)
|
|
65411
65433
|
},
|
|
65412
65434
|
keyColumn: {
|
|
65413
65435
|
common: keyStyle,
|
|
65414
65436
|
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)))),
|
|
65415
65437
|
width: getPixelPropertyStr(keyWidth),
|
|
65416
|
-
|
|
65438
|
+
[marginKey]: getPixelPropertyStr((_b = key.spacing) !== null && _b !== void 0 ? _b : DEFAULT_KEY_SPACING)
|
|
65417
65439
|
},
|
|
65418
65440
|
valueColumn: {
|
|
65419
65441
|
common: valueStyle,
|
|
65420
65442
|
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)))),
|
|
65421
65443
|
width: getPixelPropertyStr(valueWidth),
|
|
65422
|
-
|
|
65444
|
+
[marginKey]: getPixelPropertyStr((_c = value.spacing) !== null && _c !== void 0 ? _c : DEFAULT_VALUE_SPACING)
|
|
65423
65445
|
}
|
|
65424
65446
|
};
|
|
65425
65447
|
return styles;
|
|
@@ -65626,11 +65648,8 @@ class ShapeModel extends BaseTooltipModel {
|
|
|
65626
65648
|
this._svgHtmlCache = '';
|
|
65627
65649
|
}
|
|
65628
65650
|
}
|
|
65629
|
-
const builtInShape = {
|
|
65630
|
-
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'
|
|
65631
|
-
};
|
|
65632
65651
|
function getSvgHtml(option, valueToHtml) {
|
|
65633
|
-
var _a, _b, _c, _d, _e, _f
|
|
65652
|
+
var _a, _b, _c, _d, _e, _f;
|
|
65634
65653
|
if (!(option === null || option === void 0 ? void 0 : option.hasShape) || !option.symbolType) {
|
|
65635
65654
|
return '';
|
|
65636
65655
|
}
|
|
@@ -65641,7 +65660,7 @@ function getSvgHtml(option, valueToHtml) {
|
|
|
65641
65660
|
const getStroke = () => (stroke ? valueToHtml(stroke) : fillString);
|
|
65642
65661
|
const sizeNumber = pixelPropertyStrToNumber(size);
|
|
65643
65662
|
const createSymbol = (symbolType) => new Symbol$1({ symbolType, size: sizeNumber, fill: true });
|
|
65644
|
-
let symbol = createSymbol(
|
|
65663
|
+
let symbol = createSymbol(symbolType);
|
|
65645
65664
|
const parsedPath = symbol.getParsedPath();
|
|
65646
65665
|
if (!parsedPath.path) {
|
|
65647
65666
|
symbol = createSymbol(parsedPath.pathStr);
|
|
@@ -65668,9 +65687,9 @@ function getSvgHtml(option, valueToHtml) {
|
|
|
65668
65687
|
</svg>`;
|
|
65669
65688
|
}
|
|
65670
65689
|
if (isObject$2(fill)) {
|
|
65671
|
-
fillString = (
|
|
65690
|
+
fillString = (_a = 'gradientColor' + option.index) !== null && _a !== void 0 ? _a : '';
|
|
65672
65691
|
let gradient = '';
|
|
65673
|
-
const stops = ((
|
|
65692
|
+
const stops = ((_b = fill.stops) !== null && _b !== void 0 ? _b : [])
|
|
65674
65693
|
.map(s => `<stop offset="${valueToHtml(s.offset.toString())}" stop-color="${valueToHtml(s.color)}"/>`)
|
|
65675
65694
|
.join('');
|
|
65676
65695
|
if (fill.gradient === 'radial') {
|
|
@@ -65679,7 +65698,7 @@ function getSvgHtml(option, valueToHtml) {
|
|
|
65679
65698
|
</radialGradient>`;
|
|
65680
65699
|
}
|
|
65681
65700
|
else if (fill.gradient === 'linear') {
|
|
65682
|
-
gradient = `<linearGradient id="${fillString}" x1="${((
|
|
65701
|
+
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}%">
|
|
65683
65702
|
${stops}
|
|
65684
65703
|
</linearGradient>`;
|
|
65685
65704
|
}
|
|
@@ -65883,33 +65902,35 @@ class ContentModel extends BaseTooltipModel {
|
|
|
65883
65902
|
if (!this.product) {
|
|
65884
65903
|
this.product = this.createElement('div', ['container-box']);
|
|
65885
65904
|
}
|
|
65886
|
-
|
|
65887
|
-
|
|
65888
|
-
|
|
65889
|
-
|
|
65890
|
-
|
|
65905
|
+
const { align } = this._option.getTooltipAttributes();
|
|
65906
|
+
if (align === 'right') {
|
|
65907
|
+
if (!this.valueBox) {
|
|
65908
|
+
this.valueBox = this._initBox('value-box', 0);
|
|
65909
|
+
}
|
|
65910
|
+
if (!this.keyBox) {
|
|
65911
|
+
this.keyBox = this._initBox('key-box', 1);
|
|
65912
|
+
}
|
|
65913
|
+
if (!this.shapeBox) {
|
|
65914
|
+
this.shapeBox = this._initBox('shape-box', 2);
|
|
65915
|
+
}
|
|
65891
65916
|
}
|
|
65892
|
-
|
|
65893
|
-
this.
|
|
65917
|
+
else {
|
|
65918
|
+
if (!this.shapeBox) {
|
|
65919
|
+
this.shapeBox = this._initBox('shape-box', 0);
|
|
65920
|
+
}
|
|
65921
|
+
if (!this.keyBox) {
|
|
65922
|
+
this.keyBox = this._initBox('key-box', 1);
|
|
65923
|
+
}
|
|
65924
|
+
if (!this.valueBox) {
|
|
65925
|
+
this.valueBox = this._initBox('value-box', 2);
|
|
65926
|
+
}
|
|
65894
65927
|
}
|
|
65895
65928
|
}
|
|
65896
|
-
|
|
65897
|
-
const
|
|
65898
|
-
|
|
65899
|
-
this.
|
|
65900
|
-
|
|
65901
|
-
}
|
|
65902
|
-
_initKeyBox() {
|
|
65903
|
-
const keyBox = new ContentColumnModel(this.product, this._option, 'key-box', 1);
|
|
65904
|
-
keyBox.init();
|
|
65905
|
-
this.keyBox = keyBox;
|
|
65906
|
-
this.children[keyBox.childIndex] = keyBox;
|
|
65907
|
-
}
|
|
65908
|
-
_initValueBox() {
|
|
65909
|
-
const valueBox = new ContentColumnModel(this.product, this._option, 'value-box', 2);
|
|
65910
|
-
valueBox.init();
|
|
65911
|
-
this.valueBox = valueBox;
|
|
65912
|
-
this.children[valueBox.childIndex] = valueBox;
|
|
65929
|
+
_initBox(className, index) {
|
|
65930
|
+
const box = new ContentColumnModel(this.product, this._option, className, index);
|
|
65931
|
+
box.init();
|
|
65932
|
+
this.children[box.childIndex] = box;
|
|
65933
|
+
return box;
|
|
65913
65934
|
}
|
|
65914
65935
|
setStyle(style) {
|
|
65915
65936
|
super.setStyle(mergeSpec(this._getContentContainerStyle(), style));
|
|
@@ -65957,21 +65978,25 @@ class TitleModel extends BaseTooltipModel {
|
|
|
65957
65978
|
if (!this.product) {
|
|
65958
65979
|
this.product = this.createElement('h2');
|
|
65959
65980
|
}
|
|
65981
|
+
const { align } = this._option.getTooltipAttributes();
|
|
65982
|
+
if (align === 'right' && !this.textSpan) {
|
|
65983
|
+
this._initTextSpan(0);
|
|
65984
|
+
}
|
|
65960
65985
|
const { title } = tooltipActual;
|
|
65961
65986
|
if ((title === null || title === void 0 ? void 0 : title.hasShape) && (title === null || title === void 0 ? void 0 : title.shapeType)) {
|
|
65962
65987
|
if (!this.shape) {
|
|
65963
|
-
this._initShape();
|
|
65988
|
+
this._initShape(align === 'right' ? 1 : 0);
|
|
65964
65989
|
}
|
|
65965
65990
|
}
|
|
65966
65991
|
else if (this.shape) {
|
|
65967
65992
|
this._releaseShape();
|
|
65968
65993
|
}
|
|
65969
|
-
if (!this.textSpan) {
|
|
65970
|
-
this._initTextSpan();
|
|
65994
|
+
if (align !== 'right' && !this.textSpan) {
|
|
65995
|
+
this._initTextSpan(1);
|
|
65971
65996
|
}
|
|
65972
65997
|
}
|
|
65973
|
-
_initShape() {
|
|
65974
|
-
const shape = new ShapeModel(this.product, this._option,
|
|
65998
|
+
_initShape(index = 0) {
|
|
65999
|
+
const shape = new ShapeModel(this.product, this._option, index);
|
|
65975
66000
|
shape.init();
|
|
65976
66001
|
this.shape = shape;
|
|
65977
66002
|
this.children[shape.childIndex] = shape;
|
|
@@ -65984,8 +66009,8 @@ class TitleModel extends BaseTooltipModel {
|
|
|
65984
66009
|
delete this.children[this.shape.childIndex];
|
|
65985
66010
|
this.shape = null;
|
|
65986
66011
|
}
|
|
65987
|
-
_initTextSpan() {
|
|
65988
|
-
const textSpan = new TextModel(this.product, this._option,
|
|
66012
|
+
_initTextSpan(index = 1) {
|
|
66013
|
+
const textSpan = new TextModel(this.product, this._option, index);
|
|
65989
66014
|
textSpan.init();
|
|
65990
66015
|
this.textSpan = textSpan;
|
|
65991
66016
|
this.children[textSpan.childIndex] = textSpan;
|
|
@@ -66366,7 +66391,7 @@ const registerCanvasTooltipHandler = () => {
|
|
|
66366
66391
|
registerComponentPlugin(CanvasTooltipHandler);
|
|
66367
66392
|
};
|
|
66368
66393
|
|
|
66369
|
-
const version = "1.11.
|
|
66394
|
+
const version = "1.11.5";
|
|
66370
66395
|
|
|
66371
66396
|
const addVChartProperty = (data, op) => {
|
|
66372
66397
|
const context = op.beforeCall();
|
|
@@ -75776,7 +75801,13 @@ const waterfall = (lastData, op) => {
|
|
|
75776
75801
|
const totalData = [];
|
|
75777
75802
|
const { dimensionValues, dimensionData } = groupData().latestData;
|
|
75778
75803
|
const indexValues = Array.from(dimensionValues[indexField]);
|
|
75779
|
-
let temp = {
|
|
75804
|
+
let temp = {
|
|
75805
|
+
start: 0,
|
|
75806
|
+
end: 0,
|
|
75807
|
+
positive: 0,
|
|
75808
|
+
negative: 0,
|
|
75809
|
+
lastIndex: null
|
|
75810
|
+
};
|
|
75780
75811
|
indexValues.forEach((key, index) => {
|
|
75781
75812
|
const total = {
|
|
75782
75813
|
start: temp.end,
|
|
@@ -75784,7 +75815,9 @@ const waterfall = (lastData, op) => {
|
|
|
75784
75815
|
lastIndex: temp.lastIndex,
|
|
75785
75816
|
lastEnd: temp.end,
|
|
75786
75817
|
index: key,
|
|
75787
|
-
isTotal: false
|
|
75818
|
+
isTotal: false,
|
|
75819
|
+
positive: temp.end,
|
|
75820
|
+
negative: temp.end
|
|
75788
75821
|
};
|
|
75789
75822
|
const indexData = dimensionData[key];
|
|
75790
75823
|
indexData === null || indexData === void 0 ? void 0 : indexData.forEach((d, i) => {
|
|
@@ -75846,12 +75879,22 @@ function computeTotalWithMultipleData(indexData, key, total, totalData, temp, in
|
|
|
75846
75879
|
let { start, end } = getTotalStartEnd(totalConfigData, total, totalData, temp, totalSpec);
|
|
75847
75880
|
total.start = start;
|
|
75848
75881
|
total.end = end;
|
|
75882
|
+
let positive = start;
|
|
75883
|
+
let navigate = start;
|
|
75849
75884
|
let valueTemp = end - start;
|
|
75850
75885
|
_normalTemp.forEach(d => {
|
|
75851
|
-
|
|
75852
|
-
|
|
75853
|
-
|
|
75854
|
-
|
|
75886
|
+
const value = +d[valueField];
|
|
75887
|
+
if (value >= 0) {
|
|
75888
|
+
d[startAs] = +positive;
|
|
75889
|
+
positive = precisionAdd(positive, value);
|
|
75890
|
+
}
|
|
75891
|
+
else {
|
|
75892
|
+
d[startAs] = +navigate;
|
|
75893
|
+
navigate = precisionAdd(navigate, value);
|
|
75894
|
+
}
|
|
75895
|
+
d[endAs] = precisionAdd(d[startAs], value);
|
|
75896
|
+
start = precisionAdd(start, value);
|
|
75897
|
+
valueTemp = precisionSub(valueTemp, value);
|
|
75855
75898
|
});
|
|
75856
75899
|
_totalTemp.forEach(d => {
|
|
75857
75900
|
d[startAs] = +start;
|
|
@@ -75885,9 +75928,17 @@ function computeNormalData(indexData, key, total, totalData, temp, indexValues,
|
|
|
75885
75928
|
}
|
|
75886
75929
|
}
|
|
75887
75930
|
if (!isTotalTag) {
|
|
75888
|
-
|
|
75889
|
-
|
|
75890
|
-
|
|
75931
|
+
const value = +d[valueField];
|
|
75932
|
+
if (value >= 0) {
|
|
75933
|
+
d[startAs] = +total.positive;
|
|
75934
|
+
total.positive = precisionAdd(total.positive, value);
|
|
75935
|
+
}
|
|
75936
|
+
else {
|
|
75937
|
+
d[startAs] = +total.negative;
|
|
75938
|
+
total.negative = precisionAdd(total.negative, value);
|
|
75939
|
+
}
|
|
75940
|
+
d[endAs] = precisionAdd(d[startAs], value);
|
|
75941
|
+
total.end = precisionAdd(total.end, value);
|
|
75891
75942
|
}
|
|
75892
75943
|
total.isTotal = isTotalTag;
|
|
75893
75944
|
if (isNil$1(seriesField) || seriesField === WaterfallDefaultSeriesField) {
|