@visactor/vchart 2.0.9 → 2.0.10-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 +269 -55
- package/build/index.js +269 -55
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/box-plot/box-plot-transformer.js +1 -1
- package/cjs/chart/box-plot/box-plot-transformer.js.map +1 -1
- package/cjs/component/custom-mark/custom-mark.js +2 -2
- package/cjs/component/custom-mark/custom-mark.js.map +1 -1
- package/cjs/component/tooltip/utils/show-tooltip.js +3 -3
- package/cjs/component/tooltip/utils/show-tooltip.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/mark/base/base-mark.d.ts +1 -1
- package/cjs/mark/base/base-mark.js +3 -3
- package/cjs/mark/base/base-mark.js.map +1 -1
- package/cjs/series/base/base-series.js +3 -3
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/box-plot/box-plot.d.ts +3 -1
- package/cjs/series/box-plot/box-plot.js +54 -29
- package/cjs/series/box-plot/box-plot.js.map +1 -1
- package/cjs/series/box-plot/interface.d.ts +7 -2
- package/cjs/series/box-plot/interface.js.map +1 -1
- package/cjs/theme/token/builtin/default.js +1 -1
- package/cjs/theme/token/builtin/default.js.map +1 -1
- package/cjs/typings/visual.d.ts +3 -3
- package/cjs/typings/visual.js.map +1 -1
- package/esm/chart/box-plot/box-plot-transformer.js +1 -1
- package/esm/chart/box-plot/box-plot-transformer.js.map +1 -1
- package/esm/component/custom-mark/custom-mark.js +2 -2
- package/esm/component/custom-mark/custom-mark.js.map +1 -1
- package/esm/component/tooltip/utils/show-tooltip.js +3 -3
- package/esm/component/tooltip/utils/show-tooltip.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/mark/base/base-mark.d.ts +1 -1
- package/esm/mark/base/base-mark.js +3 -3
- package/esm/mark/base/base-mark.js.map +1 -1
- package/esm/series/base/base-series.js +3 -3
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/box-plot/box-plot.d.ts +3 -1
- package/esm/series/box-plot/box-plot.js +56 -29
- package/esm/series/box-plot/box-plot.js.map +1 -1
- package/esm/series/box-plot/interface.d.ts +7 -2
- package/esm/series/box-plot/interface.js.map +1 -1
- package/esm/theme/token/builtin/default.js +1 -1
- package/esm/theme/token/builtin/default.js.map +1 -1
- package/esm/typings/visual.d.ts +3 -3
- package/esm/typings/visual.js.map +1 -1
- package/package.json +8 -8
package/build/index.es.js
CHANGED
|
@@ -9500,7 +9500,7 @@ class SyncHook extends Hook {
|
|
|
9500
9500
|
|
|
9501
9501
|
const EnvContribution = Symbol.for("EnvContribution");
|
|
9502
9502
|
const VGlobal = Symbol.for("VGlobal");
|
|
9503
|
-
const DEFAULT_TEXT_FONT_FAMILY$1 = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui
|
|
9503
|
+
const DEFAULT_TEXT_FONT_FAMILY$1 = "PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,'-apple-system',segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol";
|
|
9504
9504
|
|
|
9505
9505
|
const container = new Container();
|
|
9506
9506
|
|
|
@@ -11241,7 +11241,7 @@ const DefaultTextStyle = {
|
|
|
11241
11241
|
textAlign: "left",
|
|
11242
11242
|
textBaseline: "alphabetic",
|
|
11243
11243
|
fontSize: 16,
|
|
11244
|
-
fontFamily: "PingFang SC,Microsoft Yahei,system-ui
|
|
11244
|
+
fontFamily: "PingFang SC,Microsoft Yahei,system-ui,'-apple-system',segoe ui,\n Roboto,Helvetica,Arial,sans-serif, apple color emoji,segoe ui emoji,segoe ui symbol",
|
|
11245
11245
|
fontWeight: "",
|
|
11246
11246
|
ellipsis: "…",
|
|
11247
11247
|
fontVariant: "",
|
|
@@ -16309,7 +16309,7 @@ class Graphic extends Node {
|
|
|
16309
16309
|
}
|
|
16310
16310
|
}]), noAnimateAttrs && this.setAttributesAndPreventAnimate(noAnimateAttrs, !1, {
|
|
16311
16311
|
type: AttributeUpdateType.STATE
|
|
16312
|
-
});
|
|
16312
|
+
}), this.finalAttribute && Object.assign(this.finalAttribute, attrs);
|
|
16313
16313
|
} else this.stopStateAnimates(), this.setAttributesAndPreventAnimate(attrs, !1, {
|
|
16314
16314
|
type: AttributeUpdateType.STATE
|
|
16315
16315
|
}), this.finalAttribute && Object.assign(this.finalAttribute, attrs);
|
|
@@ -16335,7 +16335,7 @@ class Graphic extends Node {
|
|
|
16335
16335
|
getNormalAttribute(key) {
|
|
16336
16336
|
var _a, _b;
|
|
16337
16337
|
const value = this.attribute[key];
|
|
16338
|
-
return this.animates ? null === (_a = this.finalAttribute) || void 0 === _a ? void 0 : _a[key] : null != value ? value : null === (_b = this.finalAttribute) || void 0 === _b ? void 0 : _b[key];
|
|
16338
|
+
return this.animates && this.animates.size ? null === (_a = this.finalAttribute) || void 0 === _a ? void 0 : _a[key] : null != value ? value : null === (_b = this.finalAttribute) || void 0 === _b ? void 0 : _b[key];
|
|
16339
16339
|
}
|
|
16340
16340
|
clearStates(hasAnimation) {
|
|
16341
16341
|
this.hasState() && this.normalAttrs ? (this.currentStates = [], this.applyStateAttrs(this.normalAttrs, this.currentStates, hasAnimation, !0)) : this.currentStates = [], this.normalAttrs = null;
|
|
@@ -18042,9 +18042,10 @@ let Symbol$1 = class Symbol extends Graphic {
|
|
|
18042
18042
|
}
|
|
18043
18043
|
updateSymbolAABBBoundsAccurate(attribute, symbolTheme, aabbBounds) {
|
|
18044
18044
|
const {
|
|
18045
|
-
|
|
18046
|
-
|
|
18047
|
-
|
|
18045
|
+
size = symbolTheme.size
|
|
18046
|
+
} = attribute,
|
|
18047
|
+
symbolClass = this.getParsedPath();
|
|
18048
|
+
return symbolClass ? (symbolClass.bounds(size, aabbBounds), aabbBounds) : aabbBounds;
|
|
18048
18049
|
}
|
|
18049
18050
|
needUpdateTags(keys) {
|
|
18050
18051
|
return super.needUpdateTags(keys, SYMBOL_UPDATE_TAG_KEY);
|
|
@@ -18053,8 +18054,9 @@ let Symbol$1 = class Symbol extends Graphic {
|
|
|
18053
18054
|
return super.needUpdateTag(key, SYMBOL_UPDATE_TAG_KEY);
|
|
18054
18055
|
}
|
|
18055
18056
|
toCustomPath() {
|
|
18056
|
-
const symbolInstance = this.getParsedPath()
|
|
18057
|
-
|
|
18057
|
+
const symbolInstance = this.getParsedPath();
|
|
18058
|
+
if (!symbolInstance) return null;
|
|
18059
|
+
const size = this.attribute.size,
|
|
18058
18060
|
formattedSize = isArray$1(size) ? size : [size, size];
|
|
18059
18061
|
return symbolInstance.path ? new CustomPath2D().fromCustomPath2D(symbolInstance.path, 0, 0, formattedSize[0], formattedSize[1]) : new CustomPath2D().fromString(symbolInstance.pathStr, 0, 0, formattedSize[0], formattedSize[1]);
|
|
18060
18062
|
}
|
|
@@ -24019,7 +24021,7 @@ class Stage extends Group$1 {
|
|
|
24019
24021
|
}));
|
|
24020
24022
|
}
|
|
24021
24023
|
enableAutoRefresh() {
|
|
24022
|
-
this.autoRefresh || (this.autoRefresh = !0, this.pluginService.register(new AutoRefreshPlugin()));
|
|
24024
|
+
this.autoRefresh || "node" === this.global.env || (this.autoRefresh = !0, this.pluginService.register(new AutoRefreshPlugin()));
|
|
24023
24025
|
}
|
|
24024
24026
|
disableAutoRefresh() {
|
|
24025
24027
|
this.autoRefresh && (this.autoRefresh = !1, this.pluginService.findPluginsByName("AutoRefreshPlugin").forEach(plugin => {
|
|
@@ -33183,7 +33185,7 @@ class ArcSegment extends Segment {
|
|
|
33183
33185
|
|
|
33184
33186
|
var AXIS_ELEMENT_NAME;
|
|
33185
33187
|
!function (AXIS_ELEMENT_NAME) {
|
|
33186
|
-
AXIS_ELEMENT_NAME.innerView = "inner-view", AXIS_ELEMENT_NAME.axisContainer = "axis-container", AXIS_ELEMENT_NAME.labelContainer = "axis-label-container", AXIS_ELEMENT_NAME.tickContainer = "axis-tick-container", AXIS_ELEMENT_NAME.tick = "axis-tick", AXIS_ELEMENT_NAME.subTick = "axis-sub-tick", AXIS_ELEMENT_NAME.label = "axis-label", AXIS_ELEMENT_NAME.title = "axis-title", AXIS_ELEMENT_NAME.gridContainer = "axis-grid-container", AXIS_ELEMENT_NAME.grid = "axis-grid", AXIS_ELEMENT_NAME.gridRegion = "axis-grid-region", AXIS_ELEMENT_NAME.line = "axis-line", AXIS_ELEMENT_NAME.background = "axis-background", AXIS_ELEMENT_NAME.axisLabelBackground = "axis-label-background", AXIS_ELEMENT_NAME.axisBreak = "axis-break", AXIS_ELEMENT_NAME.axisBreakSymbol = "axis-break-symbol";
|
|
33188
|
+
AXIS_ELEMENT_NAME.innerView = "inner-view", AXIS_ELEMENT_NAME.axisContainer = "axis-container", AXIS_ELEMENT_NAME.labelContainer = "axis-label-container", AXIS_ELEMENT_NAME.tickContainer = "axis-tick-container", AXIS_ELEMENT_NAME.tick = "axis-tick", AXIS_ELEMENT_NAME.subTick = "axis-sub-tick", AXIS_ELEMENT_NAME.label = "axis-label", AXIS_ELEMENT_NAME.title = "axis-title", AXIS_ELEMENT_NAME.labelHoverOnAxis = "axis-label-hover-on-axis", AXIS_ELEMENT_NAME.gridContainer = "axis-grid-container", AXIS_ELEMENT_NAME.grid = "axis-grid", AXIS_ELEMENT_NAME.gridRegion = "axis-grid-region", AXIS_ELEMENT_NAME.line = "axis-line", AXIS_ELEMENT_NAME.background = "axis-background", AXIS_ELEMENT_NAME.axisLabelBackground = "axis-label-background", AXIS_ELEMENT_NAME.axisBreak = "axis-break", AXIS_ELEMENT_NAME.axisBreakSymbol = "axis-break-symbol";
|
|
33187
33189
|
}(AXIS_ELEMENT_NAME || (AXIS_ELEMENT_NAME = {}));
|
|
33188
33190
|
var AxisStateValue;
|
|
33189
33191
|
!function (AxisStateValue) {
|
|
@@ -33220,6 +33222,26 @@ const DEFAULT_AXIS_THEME = {
|
|
|
33220
33222
|
fillOpacity: 1
|
|
33221
33223
|
}
|
|
33222
33224
|
},
|
|
33225
|
+
labelHoverOnAxis: {
|
|
33226
|
+
visible: !1,
|
|
33227
|
+
space: 7,
|
|
33228
|
+
padding: 2,
|
|
33229
|
+
position: 0,
|
|
33230
|
+
autoRotate: !1,
|
|
33231
|
+
textStyle: {
|
|
33232
|
+
fontSize: 12,
|
|
33233
|
+
fill: "red",
|
|
33234
|
+
fontWeight: "normal",
|
|
33235
|
+
fillOpacity: 1
|
|
33236
|
+
},
|
|
33237
|
+
background: {
|
|
33238
|
+
visible: !0,
|
|
33239
|
+
style: {
|
|
33240
|
+
cornerRadius: 2,
|
|
33241
|
+
fill: "black"
|
|
33242
|
+
}
|
|
33243
|
+
}
|
|
33244
|
+
},
|
|
33223
33245
|
tick: {
|
|
33224
33246
|
visible: !0,
|
|
33225
33247
|
inside: !1,
|
|
@@ -40385,7 +40407,17 @@ var __rest$b = undefined && undefined.__rest || function (s, e) {
|
|
|
40385
40407
|
loadLineAxisComponent();
|
|
40386
40408
|
class LineAxis extends AxisBase {
|
|
40387
40409
|
constructor(attributes, options) {
|
|
40388
|
-
|
|
40410
|
+
var _a;
|
|
40411
|
+
if (attributes.labelHoverOnAxis && (attributes.labelHoverOnAxis.textStyle = Object.assign({}, attributes.label.style, attributes.labelHoverOnAxis.textStyle), void 0 === attributes.labelHoverOnAxis.space)) {
|
|
40412
|
+
const {
|
|
40413
|
+
padding = 2
|
|
40414
|
+
} = attributes.labelHoverOnAxis,
|
|
40415
|
+
parsedPadding = normalizePadding(padding),
|
|
40416
|
+
toDiffPadding = "bottom" === attributes.orient ? parsedPadding[0] : "left" === attributes.orient ? parsedPadding[1] : "top" === attributes.orient ? parsedPadding[2] : parsedPadding[3],
|
|
40417
|
+
space = (null !== (_a = attributes.label.space) && void 0 !== _a ? _a : LineAxis.defaultAttributes.label.space) - toDiffPadding;
|
|
40418
|
+
attributes.labelHoverOnAxis.space = space;
|
|
40419
|
+
}
|
|
40420
|
+
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$1({}, LineAxis.defaultAttributes, attributes), options), this.labelHoverOnAxisGroup = null;
|
|
40389
40421
|
}
|
|
40390
40422
|
_renderInner(container) {
|
|
40391
40423
|
var _a;
|
|
@@ -40447,6 +40479,15 @@ class LineAxis extends AxisBase {
|
|
|
40447
40479
|
}, panel.style));
|
|
40448
40480
|
bgRect.name = AXIS_ELEMENT_NAME.background, bgRect.id = this._getNodeId("background"), bgRect.states = merge$1({}, DEFAULT_STATES$1, null !== (_a = panel.state) && void 0 !== _a ? _a : {}), axisContainer.insertBefore(bgRect, axisContainer.firstChild);
|
|
40449
40481
|
}
|
|
40482
|
+
const {
|
|
40483
|
+
labelHoverOnAxis: labelHoverOnAxis
|
|
40484
|
+
} = this.attribute;
|
|
40485
|
+
labelHoverOnAxis && labelHoverOnAxis.visible && this.renderLabelHoverOnAxis();
|
|
40486
|
+
}
|
|
40487
|
+
renderLabelHoverOnAxis() {
|
|
40488
|
+
const hoverOnLabelAttributes = this.getLabelHoverOnAxisAttribute(),
|
|
40489
|
+
hoverOnLabel = new Tag(Object.assign({}, hoverOnLabelAttributes));
|
|
40490
|
+
hoverOnLabel.name = AXIS_ELEMENT_NAME.title, hoverOnLabel.id = this._getNodeId("hover-on-label"), this.labelHoverOnAxisGroup = hoverOnLabel, this.axisContainer.add(hoverOnLabel);
|
|
40450
40491
|
}
|
|
40451
40492
|
renderLine(container) {
|
|
40452
40493
|
const {
|
|
@@ -40587,6 +40628,66 @@ class LineAxis extends AxisBase {
|
|
|
40587
40628
|
visible: !0
|
|
40588
40629
|
}, background.style)), attrs;
|
|
40589
40630
|
}
|
|
40631
|
+
getLabelHoverOnAxisAttribute() {
|
|
40632
|
+
var _a, _b;
|
|
40633
|
+
const {
|
|
40634
|
+
orient: orient
|
|
40635
|
+
} = this.attribute,
|
|
40636
|
+
_c = this.attribute.labelHoverOnAxis,
|
|
40637
|
+
{
|
|
40638
|
+
position = 0,
|
|
40639
|
+
space = 4,
|
|
40640
|
+
autoRotate = !0,
|
|
40641
|
+
textStyle = {},
|
|
40642
|
+
background = {},
|
|
40643
|
+
formatMethod: formatMethod,
|
|
40644
|
+
text: textContent = "",
|
|
40645
|
+
maxWidth: maxWidth
|
|
40646
|
+
} = _c,
|
|
40647
|
+
restAttrs = __rest$b(_c, ["position", "space", "autoRotate", "textStyle", "background", "formatMethod", "text", "maxWidth"]),
|
|
40648
|
+
point = this.getTickCoord(0);
|
|
40649
|
+
"bottom" === orient || "top" === orient ? point.x = position : point.y = position;
|
|
40650
|
+
let tickLength = 0;
|
|
40651
|
+
(null === (_a = this.attribute.tick) || void 0 === _a ? void 0 : _a.visible) && !1 === this.attribute.tick.inside && (tickLength = this.attribute.tick.length || 4), (null === (_b = this.attribute.subTick) || void 0 === _b ? void 0 : _b.visible) && !1 === this.attribute.subTick.inside && (tickLength = Math.max(tickLength, this.attribute.subTick.length || 2));
|
|
40652
|
+
const offset = tickLength + 0 + space,
|
|
40653
|
+
labelPoint = this.getVerticalCoord(point, offset, !1),
|
|
40654
|
+
vector = this.getVerticalVector(offset, !1, {
|
|
40655
|
+
x: 0,
|
|
40656
|
+
y: 0
|
|
40657
|
+
});
|
|
40658
|
+
let textBaseline,
|
|
40659
|
+
{
|
|
40660
|
+
angle: angle
|
|
40661
|
+
} = restAttrs,
|
|
40662
|
+
textAlign = "center";
|
|
40663
|
+
if (isNil$1(angle) && autoRotate) {
|
|
40664
|
+
const axisVector = this.getRelativeVector();
|
|
40665
|
+
angle = angleTo(axisVector, [1, 0], !0);
|
|
40666
|
+
const {
|
|
40667
|
+
verticalFactor = 1
|
|
40668
|
+
} = this.attribute;
|
|
40669
|
+
textBaseline = 1 === -1 * verticalFactor ? "bottom" : "top";
|
|
40670
|
+
} else {
|
|
40671
|
+
const {
|
|
40672
|
+
textAlign: textAlign2,
|
|
40673
|
+
textBaseline: textBaseline2
|
|
40674
|
+
} = this.getLabelAlign(vector, !1, textStyle.angle);
|
|
40675
|
+
textAlign = textAlign2, textBaseline = textBaseline2;
|
|
40676
|
+
}
|
|
40677
|
+
const maxTagWidth = maxWidth,
|
|
40678
|
+
text = formatMethod ? formatMethod(textContent) : textContent,
|
|
40679
|
+
attrs = Object.assign(Object.assign(Object.assign({}, labelPoint), restAttrs), {
|
|
40680
|
+
maxWidth: maxTagWidth,
|
|
40681
|
+
textStyle: Object.assign({
|
|
40682
|
+
textAlign: textAlign,
|
|
40683
|
+
textBaseline: textBaseline
|
|
40684
|
+
}, textStyle),
|
|
40685
|
+
text: text
|
|
40686
|
+
});
|
|
40687
|
+
return attrs.angle = angle, background && background.visible && (attrs.panel = Object.assign(Object.assign({
|
|
40688
|
+
visible: !0
|
|
40689
|
+
}, restAttrs.panel), background.style)), attrs;
|
|
40690
|
+
}
|
|
40590
40691
|
getTextBaseline(vector, inside) {
|
|
40591
40692
|
let base = "middle";
|
|
40592
40693
|
const {
|
|
@@ -40777,6 +40878,40 @@ class LineAxis extends AxisBase {
|
|
|
40777
40878
|
}
|
|
40778
40879
|
return limitLength && (limitLength = (limitLength - labelSpace - titleSpacing - titleHeight - axisLineWidth - tickLength) / layerCount), limitLength;
|
|
40779
40880
|
}
|
|
40881
|
+
showLabelHoverOnAxis(position, text, adjustPosition = !0) {
|
|
40882
|
+
if (this.attribute.labelHoverOnAxis) {
|
|
40883
|
+
const preContainerBounds = this.axisContainer.AABBBounds,
|
|
40884
|
+
preWidth = preContainerBounds.width(),
|
|
40885
|
+
preHeight = preContainerBounds.height(),
|
|
40886
|
+
preX1 = preContainerBounds.x1,
|
|
40887
|
+
preY1 = preContainerBounds.y1,
|
|
40888
|
+
preX2 = preContainerBounds.x2,
|
|
40889
|
+
preY2 = preContainerBounds.y2;
|
|
40890
|
+
if (this.labelHoverOnAxisGroup) {
|
|
40891
|
+
const {
|
|
40892
|
+
formatMethod: formatMethod
|
|
40893
|
+
} = this.attribute.labelHoverOnAxis,
|
|
40894
|
+
textStr = formatMethod ? formatMethod(text) : text;
|
|
40895
|
+
this.labelHoverOnAxisGroup.setAttribute("text", textStr), this.labelHoverOnAxisGroup.setAttribute("visible", !0), this.labelHoverOnAxisGroup.setAttribute("visibleAll", !0), "left" === this.attribute.orient || "right" === this.attribute.orient ? this.labelHoverOnAxisGroup.setAttributes({
|
|
40896
|
+
y: position
|
|
40897
|
+
}) : this.labelHoverOnAxisGroup.setAttributes({
|
|
40898
|
+
x: position
|
|
40899
|
+
});
|
|
40900
|
+
} else this.attribute.labelHoverOnAxis.visible = !0, this.attribute.labelHoverOnAxis.position = position, this.attribute.labelHoverOnAxis.text = text, this.renderLabelHoverOnAxis();
|
|
40901
|
+
if (adjustPosition) {
|
|
40902
|
+
const afterContainerBounds = this.axisContainer.AABBBounds,
|
|
40903
|
+
diffWidth = afterContainerBounds.width() - preWidth,
|
|
40904
|
+
diffHeight = afterContainerBounds.height() - preHeight;
|
|
40905
|
+
diffWidth > 0 && ("top" === this.attribute.orient || "bottom" === this.attribute.orient) && (afterContainerBounds.x1 < preX1 ? this.showLabelHoverOnAxis(position + diffWidth, text, !1) : afterContainerBounds.x2 > preX2 && this.showLabelHoverOnAxis(position - diffWidth, text, !1)), diffHeight > 0 && ("left" === this.attribute.orient || "right" === this.attribute.orient) && (afterContainerBounds.y1 < preY1 ? this.showLabelHoverOnAxis(position + diffHeight, text, !1) : afterContainerBounds.y2 > preY2 && this.showLabelHoverOnAxis(position - diffHeight, text, !1));
|
|
40906
|
+
}
|
|
40907
|
+
}
|
|
40908
|
+
}
|
|
40909
|
+
hideLabelHoverOnAxis() {
|
|
40910
|
+
this.attribute.labelHoverOnAxis && this.labelHoverOnAxisGroup && this.labelHoverOnAxisGroup.setAttributes({
|
|
40911
|
+
visible: !1,
|
|
40912
|
+
visibleAll: !1
|
|
40913
|
+
});
|
|
40914
|
+
}
|
|
40780
40915
|
release() {
|
|
40781
40916
|
super.release(), this._breaks = null;
|
|
40782
40917
|
}
|
|
@@ -42398,7 +42533,7 @@ const polarAngleAxisDiscreteTicks = (scale, op) => {
|
|
|
42398
42533
|
labelStyle: labelStyle
|
|
42399
42534
|
} = op,
|
|
42400
42535
|
radius = null == getRadius ? void 0 : getRadius();
|
|
42401
|
-
if (!radius) return convertDomainToTickData(scale.domain());
|
|
42536
|
+
if (!radius || radius <= 0) return convertDomainToTickData(scale.domain());
|
|
42402
42537
|
let scaleTicks;
|
|
42403
42538
|
if (isValid$1(tickStep)) scaleTicks = scale.stepTicks(tickStep);else if (isValid$1(forceTickCount)) scaleTicks = scale.forceTicks(forceTickCount);else if (isValid$1(tickCount)) {
|
|
42404
42539
|
const range = scale.range(),
|
|
@@ -43579,20 +43714,23 @@ class LabelBase extends AnimateComponent {
|
|
|
43579
43714
|
{
|
|
43580
43715
|
enter: enter
|
|
43581
43716
|
} = this._animationConfig;
|
|
43582
|
-
[text, labelLine].filter(Boolean).forEach(item =>
|
|
43583
|
-
|
|
43584
|
-
|
|
43585
|
-
|
|
43586
|
-
|
|
43587
|
-
|
|
43588
|
-
|
|
43589
|
-
|
|
43590
|
-
|
|
43591
|
-
|
|
43592
|
-
|
|
43593
|
-
|
|
43594
|
-
|
|
43595
|
-
|
|
43717
|
+
[text, labelLine].filter(Boolean).forEach(item => {
|
|
43718
|
+
var _a;
|
|
43719
|
+
null === (_a = item.setFinalAttributes) || void 0 === _a || _a.call(item, item.attribute), item.applyAnimationState(["enter"], [{
|
|
43720
|
+
name: "enter",
|
|
43721
|
+
animation: Object.assign(Object.assign({}, enter), {
|
|
43722
|
+
type: "labelEnter",
|
|
43723
|
+
selfOnly: !0,
|
|
43724
|
+
customParameters: {
|
|
43725
|
+
relatedGraphic: relatedGraphic,
|
|
43726
|
+
relatedGraphics: this._idToGraphic,
|
|
43727
|
+
config: Object.assign(Object.assign({}, enter), {
|
|
43728
|
+
type: item === text ? enter.type : "fadeIn"
|
|
43729
|
+
})
|
|
43730
|
+
}
|
|
43731
|
+
})
|
|
43732
|
+
}]);
|
|
43733
|
+
});
|
|
43596
43734
|
}
|
|
43597
43735
|
_runUpdateAnimation(prevLabel, currentLabel) {
|
|
43598
43736
|
const {
|
|
@@ -52319,7 +52457,7 @@ function isTokenKey(obj) {
|
|
|
52319
52457
|
}
|
|
52320
52458
|
|
|
52321
52459
|
const token = {
|
|
52322
|
-
fontFamily:
|
|
52460
|
+
fontFamily: `PingFang SC,Helvetica Neue,Microsoft Yahei,system-ui,'-apple-system',segoe ui,Roboto,Helvetica,Arial,sans-serif,apple color emoji,segoe ui emoji,segoe ui symbol`,
|
|
52323
52461
|
fontSize: 14,
|
|
52324
52462
|
l1FontSize: 32,
|
|
52325
52463
|
l1LineHeight: '150%',
|
|
@@ -57903,7 +58041,7 @@ class BaseMark extends GrammarItem {
|
|
|
57903
58041
|
}
|
|
57904
58042
|
}
|
|
57905
58043
|
};
|
|
57906
|
-
this._setStateOfGraphic = (g) => {
|
|
58044
|
+
this._setStateOfGraphic = (g, hasAnimation) => {
|
|
57907
58045
|
g.clearStates();
|
|
57908
58046
|
g.stateProxy = null;
|
|
57909
58047
|
if (g.context.diffState === DiffState.enter || g.context.diffState === DiffState.update) {
|
|
@@ -57911,7 +58049,7 @@ class BaseMark extends GrammarItem {
|
|
|
57911
58049
|
var _a;
|
|
57912
58050
|
return this._runEncoderOfGraphic((_a = this._encoderOfState) === null || _a === void 0 ? void 0 : _a[stateName], g);
|
|
57913
58051
|
};
|
|
57914
|
-
g.context.states && g.useStates(g.context.states);
|
|
58052
|
+
g.context.states && g.useStates(g.context.states, hasAnimation);
|
|
57915
58053
|
}
|
|
57916
58054
|
};
|
|
57917
58055
|
this.name = name;
|
|
@@ -58664,7 +58802,7 @@ class BaseMark extends GrammarItem {
|
|
|
58664
58802
|
g.setFinalAttributes(finalAttrs);
|
|
58665
58803
|
}
|
|
58666
58804
|
}
|
|
58667
|
-
this._setStateOfGraphic(g);
|
|
58805
|
+
this._setStateOfGraphic(g, hasStateAnimation);
|
|
58668
58806
|
this._setGraphicFromMarkConfig(g);
|
|
58669
58807
|
});
|
|
58670
58808
|
}
|
|
@@ -61389,7 +61527,7 @@ const lookup = (data, opt) => {
|
|
|
61389
61527
|
});
|
|
61390
61528
|
};
|
|
61391
61529
|
|
|
61392
|
-
const version = "2.0.
|
|
61530
|
+
const version = "2.0.10-alpha.1";
|
|
61393
61531
|
|
|
61394
61532
|
const addVChartProperty = (data, op) => {
|
|
61395
61533
|
const context = op.beforeCall();
|
|
@@ -62760,7 +62898,7 @@ class BaseSeries extends BaseModel {
|
|
|
62760
62898
|
if (isValid$1(spec.id)) {
|
|
62761
62899
|
mark.setUserId(spec.id);
|
|
62762
62900
|
}
|
|
62763
|
-
if (options.hasAnimation) {
|
|
62901
|
+
if (options.hasAnimation && spec.animation !== false) {
|
|
62764
62902
|
const config = animationConfig({}, userAnimationConfig(spec.type, spec, this._markAttributeContext));
|
|
62765
62903
|
mark.setAnimationConfig(config);
|
|
62766
62904
|
}
|
|
@@ -62770,7 +62908,7 @@ class BaseSeries extends BaseModel {
|
|
|
62770
62908
|
this._createExtensionMark(s, mark, namePrefix, i, options);
|
|
62771
62909
|
});
|
|
62772
62910
|
}
|
|
62773
|
-
|
|
62911
|
+
if (!isNil$1(spec.dataId) || !isNil$1(spec.dataIndex)) {
|
|
62774
62912
|
const dataView = this._option.getSeriesData(spec.dataId, spec.dataIndex);
|
|
62775
62913
|
if (dataView === this._rawData) {
|
|
62776
62914
|
mark.setData(this._data);
|
|
@@ -76408,6 +76546,7 @@ class BoxPlotSeries extends CartesianSeries {
|
|
|
76408
76546
|
constructor() {
|
|
76409
76547
|
super(...arguments);
|
|
76410
76548
|
this.type = SeriesTypeEnum.boxPlot;
|
|
76549
|
+
this._bandPosition = 0;
|
|
76411
76550
|
}
|
|
76412
76551
|
getMinField() {
|
|
76413
76552
|
return this._minField;
|
|
@@ -76440,7 +76579,7 @@ class BoxPlotSeries extends CartesianSeries {
|
|
|
76440
76579
|
return this._outliersStyle;
|
|
76441
76580
|
}
|
|
76442
76581
|
setAttrFromSpec() {
|
|
76443
|
-
var _a, _b, _c, _d, _e;
|
|
76582
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
|
76444
76583
|
super.setAttrFromSpec();
|
|
76445
76584
|
const boxPlotStyle = (_b = (_a = this._spec.boxPlot) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : {};
|
|
76446
76585
|
this._minField = this._spec.minField;
|
|
@@ -76457,7 +76596,7 @@ class BoxPlotSeries extends CartesianSeries {
|
|
|
76457
76596
|
this._strokeColor = boxPlotStyle.stroke;
|
|
76458
76597
|
this._shaftFillOpacity =
|
|
76459
76598
|
this._shaftShape === 'bar' ? (_e = boxPlotStyle.shaftFillOpacity) !== null && _e !== void 0 ? _e : DEFAULT_SHAFT_FILL_OPACITY : undefined;
|
|
76460
|
-
this._outliersStyle = this._spec.outliersStyle;
|
|
76599
|
+
this._outliersStyle = ((_f = this._spec.outliersStyle) !== null && _f !== void 0 ? _f : (_g = this._spec.outlier) === null || _g === void 0 ? void 0 : _g.style);
|
|
76461
76600
|
}
|
|
76462
76601
|
initMark() {
|
|
76463
76602
|
this._boxPlotMark = this._createMark(BoxPlotSeries.mark.boxPlot, {
|
|
@@ -76479,24 +76618,37 @@ class BoxPlotSeries extends CartesianSeries {
|
|
|
76479
76618
|
if (boxPlotMark) {
|
|
76480
76619
|
const commonBoxplotStyles = {
|
|
76481
76620
|
lineWidth: this._lineWidth,
|
|
76482
|
-
fill: (_a = this._boxFillColor) !== null && _a !== void 0 ? _a : (this._shaftShape
|
|
76621
|
+
fill: (_a = this._boxFillColor) !== null && _a !== void 0 ? _a : (this._shaftShape !== 'line' ? this.getColorAttribute() : DEFAULT_FILL_COLOR),
|
|
76483
76622
|
minMaxFillOpacity: this._shaftFillOpacity,
|
|
76484
|
-
stroke: (_b = this._strokeColor) !== null && _b !== void 0 ? _b : (this._shaftShape
|
|
76623
|
+
stroke: (_b = this._strokeColor) !== null && _b !== void 0 ? _b : (this._shaftShape !== 'line' ? DEFAULT_STROKE_COLOR : this.getColorAttribute())
|
|
76485
76624
|
};
|
|
76486
76625
|
boxPlotMark.setGlyphConfig({
|
|
76487
76626
|
direction: this._direction,
|
|
76488
76627
|
shaftShape: this._shaftShape
|
|
76489
76628
|
});
|
|
76490
76629
|
const boxPlotMarkStyles = this._direction === "horizontal"
|
|
76491
|
-
?
|
|
76492
|
-
|
|
76630
|
+
? {
|
|
76631
|
+
y: (datum) => this._getPosition(this.direction, datum),
|
|
76632
|
+
boxHeight: () => { var _a; return getActualNumValue((_a = this._boxWidth) !== null && _a !== void 0 ? _a : '100%', this._getMarkWidth()); },
|
|
76633
|
+
ruleHeight: () => { var _a; return getActualNumValue((_a = this._shaftWidth) !== null && _a !== void 0 ? _a : '100%', this._getMarkWidth()); },
|
|
76634
|
+
q1q3Height: () => { var _a; return getActualNumValue((_a = this._boxWidth) !== null && _a !== void 0 ? _a : '100%', this._getMarkWidth()); },
|
|
76635
|
+
minMaxHeight: () => { var _a; return getActualNumValue((_a = this._shaftWidth) !== null && _a !== void 0 ? _a : '100%', this._getMarkWidth()); }
|
|
76636
|
+
}
|
|
76637
|
+
: {
|
|
76638
|
+
x: (datum) => this._getPosition(this.direction, datum),
|
|
76639
|
+
boxWidth: () => { var _a; return getActualNumValue((_a = this._boxWidth) !== null && _a !== void 0 ? _a : '100%', this._getMarkWidth()); },
|
|
76640
|
+
ruleWidth: () => { var _a; return getActualNumValue((_a = this._shaftWidth) !== null && _a !== void 0 ? _a : '100%', this._getMarkWidth()); },
|
|
76641
|
+
q1q3Width: () => { var _a; return getActualNumValue((_a = this._boxWidth) !== null && _a !== void 0 ? _a : '100%', this._getMarkWidth()); },
|
|
76642
|
+
minMaxWidth: () => { var _a; return getActualNumValue((_a = this._shaftWidth) !== null && _a !== void 0 ? _a : '100%', this._getMarkWidth()); }
|
|
76643
|
+
};
|
|
76644
|
+
this.setMarkStyle(boxPlotMark, commonBoxplotStyles, STATE_VALUE_ENUM.STATE_NORMAL, AttributeLevel.Series);
|
|
76645
|
+
this.setMarkStyle(boxPlotMark, boxPlotMarkStyles, STATE_VALUE_ENUM.STATE_NORMAL, AttributeLevel.Built_In);
|
|
76493
76646
|
}
|
|
76494
76647
|
const outlierMark = this._outlierMark;
|
|
76495
76648
|
if (outlierMark) {
|
|
76496
76649
|
this.setMarkStyle(outlierMark, {
|
|
76497
76650
|
fill: (_d = (_c = this._outliersStyle) === null || _c === void 0 ? void 0 : _c.fill) !== null && _d !== void 0 ? _d : this.getColorAttribute(),
|
|
76498
|
-
size: isNumber$1((_e = this._outliersStyle) === null || _e === void 0 ? void 0 : _e.size) ? this._outliersStyle.size : DEFAULT_OUTLIER_SIZE
|
|
76499
|
-
symbolType: 'circle'
|
|
76651
|
+
size: isNumber$1((_e = this._outliersStyle) === null || _e === void 0 ? void 0 : _e.size) ? this._outliersStyle.size : DEFAULT_OUTLIER_SIZE
|
|
76500
76652
|
}, STATE_VALUE_ENUM.STATE_NORMAL, AttributeLevel.Series);
|
|
76501
76653
|
}
|
|
76502
76654
|
}
|
|
@@ -76531,13 +76683,13 @@ class BoxPlotSeries extends CartesianSeries {
|
|
|
76531
76683
|
const scale = (_b = axisHelper === null || axisHelper === void 0 ? void 0 : axisHelper.getScale) === null || _b === void 0 ? void 0 : _b.call(axisHelper, 0);
|
|
76532
76684
|
const outlierMarkPositionChannel = this._direction === "horizontal"
|
|
76533
76685
|
? {
|
|
76534
|
-
y: this.
|
|
76686
|
+
y: (datum) => this._getPosition(this.direction, datum),
|
|
76535
76687
|
x: (datum) => valueInScaleRange(dataToPosition(this.getDatumPositionValues(datum, BOX_PLOT_OUTLIER_VALUE_FIELD), {
|
|
76536
76688
|
bandPosition: this._bandPosition
|
|
76537
76689
|
}), scale)
|
|
76538
76690
|
}
|
|
76539
76691
|
: {
|
|
76540
|
-
x: this.
|
|
76692
|
+
x: (datum) => this._getPosition(this.direction, datum),
|
|
76541
76693
|
y: (datum) => valueInScaleRange(dataToPosition(this.getDatumPositionValues(datum, BOX_PLOT_OUTLIER_VALUE_FIELD), {
|
|
76542
76694
|
bandPosition: this._bandPosition
|
|
76543
76695
|
}), scale)
|
|
@@ -76583,16 +76735,73 @@ class BoxPlotSeries extends CartesianSeries {
|
|
|
76583
76735
|
this.initBoxPlotMarkStyle();
|
|
76584
76736
|
}
|
|
76585
76737
|
_getMarkWidth() {
|
|
76738
|
+
var _a;
|
|
76586
76739
|
if (this._autoBoxWidth) {
|
|
76587
76740
|
return this._autoBoxWidth;
|
|
76588
76741
|
}
|
|
76589
76742
|
const bandAxisHelper = this._direction === "horizontal" ? this._yAxisHelper : this._xAxisHelper;
|
|
76590
|
-
const
|
|
76591
|
-
const
|
|
76592
|
-
|
|
76593
|
-
this.
|
|
76743
|
+
const depthFromSpec = this._groups ? this._groups.fields.length : 1;
|
|
76744
|
+
const bandWidth = (_a = bandAxisHelper.getBandwidth) === null || _a === void 0 ? void 0 : _a.call(bandAxisHelper, depthFromSpec - 1);
|
|
76745
|
+
let width = bandWidth;
|
|
76746
|
+
if (isValid$1(this._spec.boxWidth)) {
|
|
76747
|
+
width = getActualNumValue(this._spec.boxWidth, bandWidth);
|
|
76748
|
+
}
|
|
76749
|
+
if (isValid$1(this._spec.boxMinWidth)) {
|
|
76750
|
+
width = Math.max(width, getActualNumValue(this._spec.boxMinWidth, bandWidth));
|
|
76751
|
+
}
|
|
76752
|
+
if (isValid$1(this._spec.boxMaxWidth)) {
|
|
76753
|
+
width = Math.min(width, getActualNumValue(this._spec.boxMaxWidth, bandWidth));
|
|
76754
|
+
}
|
|
76755
|
+
this._autoBoxWidth = width;
|
|
76594
76756
|
return this._autoBoxWidth;
|
|
76595
76757
|
}
|
|
76758
|
+
_getPosition(direction, datum) {
|
|
76759
|
+
var _a, _b, _c, _d;
|
|
76760
|
+
let axisHelper;
|
|
76761
|
+
let sizeAttribute;
|
|
76762
|
+
let dataToPosition;
|
|
76763
|
+
if (direction === "horizontal") {
|
|
76764
|
+
axisHelper = this.getYAxisHelper();
|
|
76765
|
+
sizeAttribute = 'boxHeight';
|
|
76766
|
+
dataToPosition = this.dataToPositionY.bind(this);
|
|
76767
|
+
}
|
|
76768
|
+
else {
|
|
76769
|
+
axisHelper = this.getXAxisHelper();
|
|
76770
|
+
sizeAttribute = 'boxWidth';
|
|
76771
|
+
dataToPosition = this.dataToPositionX.bind(this);
|
|
76772
|
+
}
|
|
76773
|
+
const scale = axisHelper.getScale(0);
|
|
76774
|
+
const depthFromSpec = this._groups ? this._groups.fields.length : 1;
|
|
76775
|
+
const depth = depthFromSpec;
|
|
76776
|
+
const bandWidth = (_a = axisHelper.getBandwidth) === null || _a === void 0 ? void 0 : _a.call(axisHelper, depth - 1);
|
|
76777
|
+
const size = this._boxPlotMark.getAttribute(sizeAttribute, datum);
|
|
76778
|
+
if (depth > 1 && isValid$1(this._spec.boxGapInGroup)) {
|
|
76779
|
+
const groupFields = this._groups.fields;
|
|
76780
|
+
const boxGapInGroup = array(this._spec.boxGapInGroup);
|
|
76781
|
+
let totalWidth = 0;
|
|
76782
|
+
let offSet = 0;
|
|
76783
|
+
for (let index = groupFields.length - 1; index >= 1; index--) {
|
|
76784
|
+
const groupField = groupFields[index];
|
|
76785
|
+
const groupValues = (_c = (_b = axisHelper.getScale(index)) === null || _b === void 0 ? void 0 : _b.domain()) !== null && _c !== void 0 ? _c : [];
|
|
76786
|
+
const groupCount = groupValues.length;
|
|
76787
|
+
const gap = getActualNumValue((_d = boxGapInGroup[index - 1]) !== null && _d !== void 0 ? _d : last(boxGapInGroup), bandWidth);
|
|
76788
|
+
const i = groupValues.indexOf(datum[groupField]);
|
|
76789
|
+
if (index === groupFields.length - 1) {
|
|
76790
|
+
totalWidth += groupCount * size + (groupCount - 1) * gap;
|
|
76791
|
+
offSet += i * (size + gap);
|
|
76792
|
+
}
|
|
76793
|
+
else {
|
|
76794
|
+
offSet += i * (totalWidth + gap);
|
|
76795
|
+
totalWidth += totalWidth + (groupCount - 1) * gap;
|
|
76796
|
+
}
|
|
76797
|
+
}
|
|
76798
|
+
const center = scale.scale(datum[groupFields[0]]) + axisHelper.getBandwidth(0) / 2;
|
|
76799
|
+
return center - totalWidth / 2 + offSet + size / 2;
|
|
76800
|
+
}
|
|
76801
|
+
const continuous = isContinuous(scale.type || 'band');
|
|
76802
|
+
const pos = dataToPosition(datum);
|
|
76803
|
+
return pos + bandWidth * 0.5 + (continuous ? -bandWidth / 2 : 0);
|
|
76804
|
+
}
|
|
76596
76805
|
onLayoutEnd() {
|
|
76597
76806
|
super.onLayoutEnd();
|
|
76598
76807
|
this._autoBoxWidth = null;
|
|
@@ -76601,10 +76810,10 @@ class BoxPlotSeries extends CartesianSeries {
|
|
|
76601
76810
|
const newConfig = merge$1({}, config);
|
|
76602
76811
|
['appear', 'enter', 'update', 'exit', 'disappear'].forEach(state => {
|
|
76603
76812
|
if (newConfig[state] && newConfig[state].type === 'scaleIn') {
|
|
76604
|
-
newConfig[state].type = this._shaftShape === '
|
|
76813
|
+
newConfig[state].type = this._shaftShape === 'bar' ? 'barBoxplotScaleIn' : 'boxplotScaleIn';
|
|
76605
76814
|
}
|
|
76606
76815
|
else if (newConfig[state] && newConfig[state].type === 'scaleOut') {
|
|
76607
|
-
newConfig[state].type = this._shaftShape === '
|
|
76816
|
+
newConfig[state].type = this._shaftShape === 'bar' ? 'barBoxplotScaleOut' : 'boxplotScaleOut';
|
|
76608
76817
|
}
|
|
76609
76818
|
});
|
|
76610
76819
|
return newConfig;
|
|
@@ -93823,13 +94032,18 @@ class BoxPlotChartSpecTransformer extends CartesianChartSpecTransformer {
|
|
|
93823
94032
|
const dataFields = [spec.maxField, spec.medianField, spec.q1Field, spec.q3Field, spec.minField, spec.outliersField];
|
|
93824
94033
|
const seriesSpec = super._getDefaultSeriesSpec(spec, [
|
|
93825
94034
|
'boxPlot',
|
|
94035
|
+
'outlier',
|
|
93826
94036
|
'minField',
|
|
93827
94037
|
'maxField',
|
|
93828
94038
|
'q1Field',
|
|
93829
94039
|
'medianField',
|
|
93830
94040
|
'q3Field',
|
|
93831
94041
|
'outliersField',
|
|
93832
|
-
'outliersStyle'
|
|
94042
|
+
'outliersStyle',
|
|
94043
|
+
'boxWidth',
|
|
94044
|
+
'boxMaxWidth',
|
|
94045
|
+
'boxMinWidth',
|
|
94046
|
+
'boxGapInGroup'
|
|
93833
94047
|
]);
|
|
93834
94048
|
seriesSpec.direction = (_a = spec.direction) !== null && _a !== void 0 ? _a : "vertical";
|
|
93835
94049
|
seriesSpec[seriesSpec.direction === "horizontal" ? 'xField' : 'yField'] = dataFields;
|
|
@@ -95117,7 +95331,7 @@ const hasData = (data) => {
|
|
|
95117
95331
|
return Object.keys(data).length > 0;
|
|
95118
95332
|
};
|
|
95119
95333
|
function showTooltip(datum, options, component) {
|
|
95120
|
-
var _a, _b, _c;
|
|
95334
|
+
var _a, _b, _c, _d, _e, _f;
|
|
95121
95335
|
const opt = Object.assign({ regionIndex: 0 }, options);
|
|
95122
95336
|
const componentOptions = component.getOption();
|
|
95123
95337
|
const region = componentOptions.getRegionsInUserIdOrIndex(isValid$1(opt.regionId) ? [opt.regionId] : undefined, isValid$1(opt.regionIndex) ? [opt.regionIndex] : undefined)[0];
|
|
@@ -95200,7 +95414,7 @@ function showTooltip(datum, options, component) {
|
|
|
95200
95414
|
}),
|
|
95201
95415
|
item: undefined
|
|
95202
95416
|
};
|
|
95203
|
-
component.processor.dimension.showTooltip(mockDimensionInfo, mockParams, false);
|
|
95417
|
+
(_e = (_d = (_c = component.processor) === null || _c === void 0 ? void 0 : _c.dimension) === null || _d === void 0 ? void 0 : _d.showTooltip) === null || _e === void 0 ? void 0 : _e.call(_d, mockDimensionInfo, mockParams, false);
|
|
95204
95418
|
const vchart = componentOptions.globalInstance;
|
|
95205
95419
|
if (VChart.globalConfig.uniqueTooltip) {
|
|
95206
95420
|
VChart.hideTooltip(vchart.id);
|
|
@@ -95229,7 +95443,7 @@ function showTooltip(datum, options, component) {
|
|
|
95229
95443
|
changePositionOnly: false,
|
|
95230
95444
|
tooltip: null,
|
|
95231
95445
|
dimensionInfo: mockDimensionInfo,
|
|
95232
|
-
chart: (
|
|
95446
|
+
chart: (_f = componentOptions.globalInstance.getChart()) !== null && _f !== void 0 ? _f : undefined,
|
|
95233
95447
|
datum: mockDatum,
|
|
95234
95448
|
model: info.series,
|
|
95235
95449
|
source: Event_Source_Type.chart,
|
|
@@ -103135,10 +103349,10 @@ class CustomMark extends BaseComponent {
|
|
|
103135
103349
|
if (isValid$1(spec.dataId) || isValidNumber$1(spec.dataIndex)) {
|
|
103136
103350
|
const dataview = this.getChart().getSeriesData(spec.dataId, spec.dataIndex);
|
|
103137
103351
|
if (dataview) {
|
|
103352
|
+
mark.setDataView(dataview);
|
|
103138
103353
|
dataview.target.addListener('change', () => {
|
|
103139
103354
|
mark.getData().updateData();
|
|
103140
103355
|
});
|
|
103141
|
-
mark.setDataView(dataview);
|
|
103142
103356
|
}
|
|
103143
103357
|
}
|
|
103144
103358
|
}
|