@visactor/vchart 1.1.2 → 1.1.3
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/index.js +263 -143
- package/build/index.min.js +1 -1
- package/cjs/chart/waterfall/waterfall.js +1 -0
- package/cjs/chart/waterfall/waterfall.js.map +1 -1
- package/cjs/component/data-zoom/data-filter-base-component.js +2 -3
- package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/cjs/component/data-zoom/data-zoom/data-zoom.js +6 -6
- package/cjs/component/data-zoom/data-zoom/data-zoom.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/legend-data/discrete/discrete.js +3 -2
- package/cjs/data/transforms/legend-data/discrete/discrete.js.map +1 -1
- package/cjs/data/transforms/sankey.d.ts +2 -0
- package/cjs/data/transforms/sankey.js +9 -1
- package/cjs/data/transforms/sankey.js.map +1 -1
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/geo/geo.js +2 -1
- package/cjs/series/geo/geo.js.map +1 -1
- package/cjs/series/map/map.js +2 -2
- package/cjs/series/map/map.js.map +1 -1
- package/cjs/series/sankey/sankey.js +7 -4
- package/cjs/series/sankey/sankey.js.map +1 -1
- package/cjs/series/word-cloud/base.d.ts +7 -0
- package/cjs/series/word-cloud/base.js +8 -3
- package/cjs/series/word-cloud/base.js.map +1 -1
- package/esm/chart/waterfall/waterfall.js +1 -0
- package/esm/chart/waterfall/waterfall.js.map +1 -1
- package/esm/component/data-zoom/data-filter-base-component.js +2 -3
- package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/esm/component/data-zoom/data-zoom/data-zoom.js +6 -6
- package/esm/component/data-zoom/data-zoom/data-zoom.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/legend-data/discrete/discrete.js +4 -1
- package/esm/data/transforms/legend-data/discrete/discrete.js.map +1 -1
- package/esm/data/transforms/sankey.d.ts +2 -0
- package/esm/data/transforms/sankey.js +9 -1
- package/esm/data/transforms/sankey.js.map +1 -1
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/geo/geo.js +2 -1
- package/esm/series/geo/geo.js.map +1 -1
- package/esm/series/map/map.js +2 -2
- package/esm/series/map/map.js.map +1 -1
- package/esm/series/sankey/sankey.js +7 -4
- package/esm/series/sankey/sankey.js.map +1 -1
- package/esm/series/word-cloud/base.d.ts +7 -0
- package/esm/series/word-cloud/base.js +7 -0
- package/esm/series/word-cloud/base.js.map +1 -1
- package/package.json +1 -1
package/build/index.js
CHANGED
|
@@ -17808,11 +17808,13 @@
|
|
|
17808
17808
|
return console.error("暂不支持该函数"), nodes;
|
|
17809
17809
|
}
|
|
17810
17810
|
insertBefore(newNode, referenceNode) {
|
|
17811
|
+
if (!referenceNode) return this.appendChild(newNode);
|
|
17811
17812
|
if (this._uid === newNode._uid) return null;
|
|
17812
17813
|
if (newNode.isAncestorsOf(this)) throw new Error("【Node::insertBefore】不能将父辈元素insert为子元素");
|
|
17813
17814
|
return referenceNode.parent !== this ? null : (newNode.parent && newNode.parent.removeChild(newNode), newNode.parent = this, newNode._prev = referenceNode._prev, referenceNode._prev ? referenceNode._prev._next = newNode : this._firstChild = newNode, referenceNode._prev = newNode, newNode._next = referenceNode, this._idMap || (this._idMap = new Map()), this._idMap.set(newNode._uid, newNode), this._structEdit = !0, this.setCount(newNode.count), newNode);
|
|
17814
17815
|
}
|
|
17815
17816
|
insertAfter(newNode, referenceNode) {
|
|
17817
|
+
if (!referenceNode) return this.appendChild(newNode);
|
|
17816
17818
|
if (this._uid === newNode._uid) return null;
|
|
17817
17819
|
if (newNode.isAncestorsOf(this)) throw new Error("【Node::insertAfter】不能将父辈元素insert为子元素");
|
|
17818
17820
|
return referenceNode.parent !== this ? null : (newNode.parent && newNode.parent.removeChild(newNode), newNode.parent = this, referenceNode._next ? (referenceNode._next._prev = newNode, newNode._next = referenceNode._next) : this._lastChild = newNode, referenceNode._next = newNode, newNode._prev = referenceNode, this._idMap || (this._idMap = new Map()), this._idMap.set(newNode._uid, newNode), this._structEdit = !0, this.setCount(newNode.count), newNode);
|
|
@@ -22298,18 +22300,18 @@
|
|
|
22298
22300
|
bind(DefaultGlobal).toSelf().inSingletonScope(), bind(Global).toService(DefaultGlobal), bind(DefaultWindow).to(DefaultWindow), bind(Window).toService(DefaultWindow), bind(DefaultGraphicUtil).toSelf().inSingletonScope(), bind(GraphicUtil).toService(DefaultGraphicUtil), bind(DefaultTransformUtil).toSelf().inSingletonScope(), bind(TransformUtil).toService(DefaultTransformUtil), bind(DefaultLayerService).toSelf().inSingletonScope(), bind(LayerService).toService(DefaultLayerService);
|
|
22299
22301
|
});
|
|
22300
22302
|
|
|
22301
|
-
function runFill(fill) {
|
|
22302
|
-
return
|
|
22303
|
+
function runFill(fill, background) {
|
|
22304
|
+
return !(!fill && !background);
|
|
22303
22305
|
}
|
|
22304
22306
|
function runStroke(stroke, lineWidth) {
|
|
22305
22307
|
let s;
|
|
22306
22308
|
return s = isArray$3(stroke) ? stroke.some(item => item || void 0 === item) : !!stroke, s && lineWidth > 0;
|
|
22307
22309
|
}
|
|
22308
|
-
function fillVisible(opacity, fillOpacity) {
|
|
22309
|
-
return opacity * fillOpacity > 0;
|
|
22310
|
+
function fillVisible(opacity, fillOpacity, fill) {
|
|
22311
|
+
return fill && opacity * fillOpacity > 0;
|
|
22310
22312
|
}
|
|
22311
|
-
function rectFillVisible(opacity, fillOpacity, width, height) {
|
|
22312
|
-
return opacity * fillOpacity > 0 && width > 0 && height > 0;
|
|
22313
|
+
function rectFillVisible(opacity, fillOpacity, width, height, fill) {
|
|
22314
|
+
return fill && opacity * fillOpacity > 0 && width > 0 && height > 0;
|
|
22313
22315
|
}
|
|
22314
22316
|
function strokeVisible(opacity, strokeOpacity) {
|
|
22315
22317
|
return opacity * strokeOpacity > 0;
|
|
@@ -22329,7 +22331,7 @@
|
|
|
22329
22331
|
strokeOpacity = themeAttributes.strokeOpacity,
|
|
22330
22332
|
visible = themeAttributes.visible
|
|
22331
22333
|
} = graphic.attribute,
|
|
22332
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
22334
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
22333
22335
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
22334
22336
|
doFill = runFill(fill),
|
|
22335
22337
|
doStroke = runStroke(stroke, lineWidth);
|
|
@@ -22691,12 +22693,12 @@
|
|
|
22691
22693
|
x: originX = arcAttribute.x,
|
|
22692
22694
|
y: originY = arcAttribute.y
|
|
22693
22695
|
} = arc.attribute,
|
|
22694
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
22696
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
22695
22697
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
22696
|
-
doFill = runFill(fill),
|
|
22698
|
+
doFill = runFill(fill, background),
|
|
22697
22699
|
doStroke = runStroke(stroke, lineWidth);
|
|
22698
22700
|
if (!arc.valid || !visible) return;
|
|
22699
|
-
if (!
|
|
22701
|
+
if (!doFill && !doStroke) return;
|
|
22700
22702
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
|
|
22701
22703
|
const {
|
|
22702
22704
|
outerRadius = arcAttribute.outerRadius,
|
|
@@ -22709,7 +22711,7 @@
|
|
|
22709
22711
|
isFullStroke: isFullStroke,
|
|
22710
22712
|
stroke: arrayStroke
|
|
22711
22713
|
} = parseStroke(stroke);
|
|
22712
|
-
if (doFill || isFullStroke
|
|
22714
|
+
if (doFill || isFullStroke) {
|
|
22713
22715
|
if (context.beginPath(), drawArcPath$1(arc, context, x, y, outerRadius, innerRadius), !this._arcBeforeRenderContribitions) {
|
|
22714
22716
|
this._arcBeforeRenderContribitions = [], this._arcAfterRenderContribitions = [];
|
|
22715
22717
|
const contributions = this.arcRenderContribitions.getContributions() || [];
|
|
@@ -22833,11 +22835,11 @@
|
|
|
22833
22835
|
x: originX = circleAttribute.x,
|
|
22834
22836
|
y: originY = circleAttribute.y
|
|
22835
22837
|
} = circle.attribute,
|
|
22836
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
22838
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
22837
22839
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
22838
|
-
doFill = runFill(fill),
|
|
22840
|
+
doFill = runFill(fill, background),
|
|
22839
22841
|
doStroke = runStroke(stroke, lineWidth);
|
|
22840
|
-
circle.valid && visible && (doFill || doStroke
|
|
22842
|
+
circle.valid && visible && (doFill || doStroke) && (fVisible || sVisible || fillCb || strokeCb || background) && (context.beginPath(), context.arc(x, y, radius, startAngle, endAngle), context.closePath(), this._circleRenderContribitions || (this._circleRenderContribitions = this.circleRenderContribitions.getContributions() || [], this._circleRenderContribitions.sort((a, b) => b.order - a.order)), this._circleRenderContribitions.forEach(c => {
|
|
22841
22843
|
c.time === BaseRenderContributionTime.beforeFillStroke && c.drawShape(circle, context, x, y, doFill, doStroke, fVisible, sVisible, circleAttribute, drawContext, fillCb, strokeCb);
|
|
22842
22844
|
}), context.setShadowStyle && context.setShadowStyle(circle, circle.attribute, circleAttribute), doFill && (fillCb ? fillCb(context, circle.attribute, circleAttribute) : fVisible && (context.setCommonStyle(circle, circle.attribute, originX - x, originY - y, circleAttribute), context.fill())), doStroke && (strokeCb ? strokeCb(context, circle.attribute, circleAttribute) : sVisible && (context.setStrokeStyle(circle, circle.attribute, originX - x, originY - y, circleAttribute), context.stroke())), this._circleRenderContribitions.forEach(c => {
|
|
22843
22845
|
c.time === BaseRenderContributionTime.afterFillStroke && c.drawShape(circle, context, x, y, doFill, doStroke, fVisible, sVisible, circleAttribute, drawContext, fillCb, strokeCb);
|
|
@@ -25802,10 +25804,14 @@
|
|
|
25802
25804
|
return aabbBounds.set(-outerRadius, -outerRadius, outerRadius, outerRadius), aabbBounds;
|
|
25803
25805
|
}
|
|
25804
25806
|
updateArcAABBBoundsAccurate(attribute, arcTheme, aabbBounds, graphic) {
|
|
25805
|
-
|
|
25807
|
+
let {
|
|
25806
25808
|
outerRadius = arcTheme.outerRadius,
|
|
25807
25809
|
innerRadius = arcTheme.innerRadius
|
|
25808
25810
|
} = attribute;
|
|
25811
|
+
if (outerRadius < innerRadius) {
|
|
25812
|
+
const temp = outerRadius;
|
|
25813
|
+
outerRadius = innerRadius, innerRadius = temp;
|
|
25814
|
+
}
|
|
25809
25815
|
let {
|
|
25810
25816
|
endAngle = arcTheme.endAngle,
|
|
25811
25817
|
startAngle = arcTheme.startAngle
|
|
@@ -25928,7 +25934,7 @@
|
|
|
25928
25934
|
return isArray$3(text) ? !text.every(t => null == t || "" === t) : null != text && "" !== text;
|
|
25929
25935
|
}
|
|
25930
25936
|
updateMultilineAABBBounds(text) {
|
|
25931
|
-
var _a;
|
|
25937
|
+
var _a, _b, _c;
|
|
25932
25938
|
const textTheme = getTheme(this).text,
|
|
25933
25939
|
{
|
|
25934
25940
|
fontFamily = textTheme.fontFamily,
|
|
@@ -25967,6 +25973,10 @@
|
|
|
25967
25973
|
break;
|
|
25968
25974
|
}
|
|
25969
25975
|
const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth);
|
|
25976
|
+
if ("" !== str && "" === clip.str) if (ellipsis) {
|
|
25977
|
+
const clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis);
|
|
25978
|
+
clip.str = null !== (_b = clipEllipsis.str) && void 0 !== _b ? _b : "", clip.width = null !== (_c = clipEllipsis.width) && void 0 !== _c ? _c : 0;
|
|
25979
|
+
} else clip.str = "", clip.width = 0;
|
|
25970
25980
|
if (linesLayout.push({
|
|
25971
25981
|
str: clip.str,
|
|
25972
25982
|
width: clip.width
|
|
@@ -26192,6 +26202,7 @@
|
|
|
26192
26202
|
BaseRender = __decorate$1v([injectable()], BaseRender);
|
|
26193
26203
|
|
|
26194
26204
|
function drawSegments(path, segPath, percent, clipRangeByDimension, params) {
|
|
26205
|
+
if (!segPath) return;
|
|
26195
26206
|
const {
|
|
26196
26207
|
offsetX = 0,
|
|
26197
26208
|
offsetY = 0,
|
|
@@ -26294,6 +26305,7 @@
|
|
|
26294
26305
|
}
|
|
26295
26306
|
drawSegmentItem(context, cache, fill, stroke, fillOpacity, strokeOpacity, attribute, defaultAttribute, clipRange, clipRangeByDimension, offsetX, offsetY, line, fillCb, strokeCb) {
|
|
26296
26307
|
var _a;
|
|
26308
|
+
if (!cache) return;
|
|
26297
26309
|
context.beginPath();
|
|
26298
26310
|
const z = null !== (_a = this.z) && void 0 !== _a ? _a : 0;
|
|
26299
26311
|
drawSegments(context.camera ? context : context.nativeContext, cache, clipRange, clipRangeByDimension, {
|
|
@@ -26318,7 +26330,7 @@
|
|
|
26318
26330
|
lineWidth = lineAttribute.lineWidth,
|
|
26319
26331
|
visible = lineAttribute.visible
|
|
26320
26332
|
} = line.attribute,
|
|
26321
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
26333
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
26322
26334
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
26323
26335
|
doFill = runFill(fill),
|
|
26324
26336
|
doStroke = runStroke(stroke, lineWidth);
|
|
@@ -26499,12 +26511,13 @@
|
|
|
26499
26511
|
opacity = areaAttribute.opacity,
|
|
26500
26512
|
visible = areaAttribute.visible,
|
|
26501
26513
|
z = areaAttribute.z,
|
|
26514
|
+
background: background,
|
|
26502
26515
|
stroke = area.attribute.stroke,
|
|
26503
26516
|
lineWidth = areaAttribute.lineWidth,
|
|
26504
26517
|
strokeOpacity = areaAttribute.strokeOpacity
|
|
26505
26518
|
} = area.attribute,
|
|
26506
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
26507
|
-
doFill = runFill(fill),
|
|
26519
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
26520
|
+
doFill = runFill(fill, background),
|
|
26508
26521
|
doStroke = runStroke(stroke, lineWidth),
|
|
26509
26522
|
sVisible = strokeVisible(opacity, strokeOpacity);
|
|
26510
26523
|
if (!area.valid || !visible) return;
|
|
@@ -26605,6 +26618,7 @@
|
|
|
26605
26618
|
drawPathProxy(area, context, x, y, drawContext, params) || this.drawShape(area, context, x, y, drawContext, params), context.highPerformanceRestore();
|
|
26606
26619
|
}
|
|
26607
26620
|
drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, fillCb, strokeCb) {
|
|
26621
|
+
if (!cache) return;
|
|
26608
26622
|
context.beginPath();
|
|
26609
26623
|
drawAreaSegments(context.camera ? context : context.nativeContext, cache, clipRange, {
|
|
26610
26624
|
offsetX: offsetX,
|
|
@@ -26673,11 +26687,11 @@
|
|
|
26673
26687
|
y: originY = pathAttribute.y
|
|
26674
26688
|
} = path.attribute,
|
|
26675
26689
|
z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
|
|
26676
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
26690
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
26677
26691
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
26678
|
-
doFill = runFill(fill),
|
|
26692
|
+
doFill = runFill(fill, background),
|
|
26679
26693
|
doStroke = runStroke(stroke, lineWidth);
|
|
26680
|
-
if (path.valid && visible && (doFill || doStroke
|
|
26694
|
+
if (path.valid && visible && (doFill || doStroke) && (fVisible || sVisible || fillCb || strokeCb || background)) {
|
|
26681
26695
|
if (context.beginPath(), path.pathShape) renderCommandList(path.pathShape.commandList, context, x, y, 1, 1, z);else {
|
|
26682
26696
|
const path2D = null !== (_b = path.attribute.path) && void 0 !== _b ? _b : pathAttribute.path;
|
|
26683
26697
|
renderCommandList(path2D.commandList, context, x, y, 1, 1, z);
|
|
@@ -26799,12 +26813,12 @@
|
|
|
26799
26813
|
x: originX = rectAttribute.x,
|
|
26800
26814
|
y: originY = rectAttribute.y
|
|
26801
26815
|
} = rect.attribute,
|
|
26802
|
-
fVisible = rectFillVisible(opacity, fillOpacity, width, height),
|
|
26816
|
+
fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
|
|
26803
26817
|
sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
|
|
26804
|
-
doFill = runFill(fill),
|
|
26818
|
+
doFill = runFill(fill, background),
|
|
26805
26819
|
doStroke = runStroke(stroke, lineWidth);
|
|
26806
26820
|
if (!rect.valid || !visible) return;
|
|
26807
|
-
if (!
|
|
26821
|
+
if (!doFill && !doStroke) return;
|
|
26808
26822
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
|
|
26809
26823
|
0 === cornerRadius || isArray$3(cornerRadius) && cornerRadius.every(num => 0 === num) ? (context.beginPath(), context.rect(x, y, width, height)) : (context.beginPath(), createRectPath(context, x, y, width, height, cornerRadius)), this._rectRenderContribitions || (this._rectRenderContribitions = this.rectRenderContribitions.getContributions() || [], this._rectRenderContribitions.sort((a, b) => b.order - a.order));
|
|
26810
26824
|
const doFillOrStroke = {
|
|
@@ -26874,12 +26888,12 @@
|
|
|
26874
26888
|
scaleX = symbolAttribute.scaleX,
|
|
26875
26889
|
scaleY = symbolAttribute.scaleY
|
|
26876
26890
|
} = symbol.attribute,
|
|
26877
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
26891
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
26878
26892
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
26879
|
-
doFill = runFill(fill),
|
|
26893
|
+
doFill = runFill(fill, background),
|
|
26880
26894
|
doStroke = runStroke(stroke, lineWidth);
|
|
26881
26895
|
if (!symbol.valid || !visible) return;
|
|
26882
|
-
if (!
|
|
26896
|
+
if (!doFill && !doStroke) return;
|
|
26883
26897
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
|
|
26884
26898
|
const parsedPath = symbol.getParsedPath();
|
|
26885
26899
|
if (!parsedPath) return;
|
|
@@ -26957,7 +26971,7 @@
|
|
|
26957
26971
|
y: originY = textAttribute.y
|
|
26958
26972
|
} = text.attribute,
|
|
26959
26973
|
lineHeight = null !== (_a = text.attribute.lineHeight) && void 0 !== _a ? _a : fontSize,
|
|
26960
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
26974
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
26961
26975
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
26962
26976
|
doFill = runFill(fill),
|
|
26963
26977
|
doStroke = runStroke(stroke, lineWidth);
|
|
@@ -27170,11 +27184,11 @@
|
|
|
27170
27184
|
x: originX = polygonAttribute.x,
|
|
27171
27185
|
y: originY = polygonAttribute.y
|
|
27172
27186
|
} = polygon.attribute,
|
|
27173
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
27187
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
27174
27188
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
27175
|
-
doFill = runFill(fill),
|
|
27189
|
+
doFill = runFill(fill, background),
|
|
27176
27190
|
doStroke = runStroke(stroke, lineWidth);
|
|
27177
|
-
polygon.valid && visible && (doFill || doStroke
|
|
27191
|
+
polygon.valid && visible && (doFill || doStroke) && (fVisible || sVisible || fillCb || strokeCb || background) && (context.beginPath(), cornerRadius <= 0 || isArray$3(cornerRadius) && cornerRadius.every(num => 0 === num) ? drawPolygon(context.camera ? context : context.nativeContext, points, x, y) : drawRoundedPolygon(context.camera ? context : context.nativeContext, points, x, y, cornerRadius), context.closePath(), this._polygonRenderContribitions || (this._polygonRenderContribitions = this.polygonRenderContribitions.getContributions() || [], this._polygonRenderContribitions.sort((a, b) => b.order - a.order)), this._polygonRenderContribitions.forEach(c => {
|
|
27178
27192
|
c.time === BaseRenderContributionTime.beforeFillStroke && c.drawShape(polygon, context, x, y, doFill, doStroke, fVisible, sVisible, polygonAttribute, drawContext, fillCb, strokeCb);
|
|
27179
27193
|
}), context.setShadowStyle && context.setShadowStyle(polygon, polygon.attribute, polygonAttribute), doFill && (fillCb ? fillCb(context, polygon.attribute, polygonAttribute) : fillOpacity && (context.setCommonStyle(polygon, polygon.attribute, originX - x, originY - y, polygonAttribute), context.fill())), doStroke && (strokeCb ? strokeCb(context, polygon.attribute, polygonAttribute) : strokeOpacity && (context.setStrokeStyle(polygon, polygon.attribute, originX - x, originY - y, polygonAttribute), context.stroke())), this._polygonRenderContribitions.forEach(c => {
|
|
27180
27194
|
c.time === BaseRenderContributionTime.afterFillStroke && c.drawShape(polygon, context, x, y, doFill, doStroke, fVisible, sVisible, polygonAttribute, drawContext, fillCb, strokeCb);
|
|
@@ -27233,7 +27247,7 @@
|
|
|
27233
27247
|
repeatY = imageAttribute.repeatY,
|
|
27234
27248
|
image: url
|
|
27235
27249
|
} = image.attribute,
|
|
27236
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
27250
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
27237
27251
|
doFill = runFill(fill);
|
|
27238
27252
|
if (image.valid && visible && doFill && (fVisible || fillCb)) {
|
|
27239
27253
|
if (this._imageRenderContribitions || (this._imageRenderContribitions = this.imageRenderContribitions.getContributions() || []), this._imageRenderContribitions.forEach(c => {
|
|
@@ -32352,13 +32366,13 @@
|
|
|
32352
32366
|
lineWidth = groupAttribute.lineWidth,
|
|
32353
32367
|
visible = groupAttribute.visible
|
|
32354
32368
|
} = group.attribute,
|
|
32355
|
-
fVisible = rectFillVisible(opacity, fillOpacity, width, height),
|
|
32369
|
+
fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
|
|
32356
32370
|
sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
|
|
32357
|
-
doFill = runFill(fill),
|
|
32371
|
+
doFill = runFill(fill, background),
|
|
32358
32372
|
doStroke = runStroke(stroke, lineWidth);
|
|
32359
32373
|
if (!group.valid || !visible) return;
|
|
32360
32374
|
if (!clip) {
|
|
32361
|
-
if (!
|
|
32375
|
+
if (!doFill && !doStroke) return;
|
|
32362
32376
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
|
|
32363
32377
|
}
|
|
32364
32378
|
if (path && path.length && drawContext.drawContribution) {
|
|
@@ -32440,7 +32454,7 @@
|
|
|
32440
32454
|
lineWidth = lineAttribute.lineWidth,
|
|
32441
32455
|
visible = lineAttribute.visible
|
|
32442
32456
|
} = line.attribute,
|
|
32443
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
32457
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
32444
32458
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
32445
32459
|
doFill = runFill(fill),
|
|
32446
32460
|
doStroke = runStroke(stroke, lineWidth);
|
|
@@ -32490,7 +32504,7 @@
|
|
|
32490
32504
|
opacity = areaAttribute.opacity,
|
|
32491
32505
|
visible = areaAttribute.visible
|
|
32492
32506
|
} = area.attribute,
|
|
32493
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
32507
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
32494
32508
|
doFill = runFill(fill);
|
|
32495
32509
|
if (!area.valid || !visible) return;
|
|
32496
32510
|
if (!doFill) return;
|
|
@@ -32680,7 +32694,7 @@
|
|
|
32680
32694
|
visible = rectAttribute.visible
|
|
32681
32695
|
} = rect.attribute,
|
|
32682
32696
|
z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
|
|
32683
|
-
fVisible = rectFillVisible(opacity, fillOpacity, width, height),
|
|
32697
|
+
fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
|
|
32684
32698
|
sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
|
|
32685
32699
|
doFill = runFill(fill),
|
|
32686
32700
|
doStroke = runStroke(stroke, lineWidth);
|
|
@@ -32808,7 +32822,7 @@
|
|
|
32808
32822
|
visible = richtextAttribute.visible
|
|
32809
32823
|
} = richtext.attribute;
|
|
32810
32824
|
if (!richtext.valid || !visible) return;
|
|
32811
|
-
if (!fillVisible(opacity, fillOpacity)) return;
|
|
32825
|
+
if (!fillVisible(opacity, fillOpacity, !0)) return;
|
|
32812
32826
|
context.translate(x, y);
|
|
32813
32827
|
richtext.getFrameCache().draw(context, this.drawIcon);
|
|
32814
32828
|
}
|
|
@@ -32968,13 +32982,13 @@
|
|
|
32968
32982
|
strokeOpacity = arcAttribute.strokeOpacity,
|
|
32969
32983
|
visible = arcAttribute.visible
|
|
32970
32984
|
} = arc.attribute,
|
|
32971
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
32985
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
32972
32986
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
32973
|
-
doFill = runFill(fill),
|
|
32987
|
+
doFill = runFill(fill, background),
|
|
32974
32988
|
doStroke = runStroke(stroke, lineWidth),
|
|
32975
32989
|
z = null !== (_a = this.z) && void 0 !== _a ? _a : 0;
|
|
32976
32990
|
if (!arc.valid || !visible) return;
|
|
32977
|
-
if (!
|
|
32991
|
+
if (!doFill && !doStroke) return;
|
|
32978
32992
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
|
|
32979
32993
|
const {
|
|
32980
32994
|
outerRadius = arcAttribute.outerRadius,
|
|
@@ -33061,7 +33075,7 @@
|
|
|
33061
33075
|
face = [!0, !0, !0, !0, !0, !0]
|
|
33062
33076
|
} = pyramid3d.attribute,
|
|
33063
33077
|
z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
|
|
33064
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
33078
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
33065
33079
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
33066
33080
|
doFill = runFill(fill),
|
|
33067
33081
|
doStroke = runStroke(stroke, lineWidth);
|
|
@@ -35610,10 +35624,12 @@
|
|
|
35610
35624
|
};
|
|
35611
35625
|
|
|
35612
35626
|
const transform$9 = (options, upstreamData) => {
|
|
35627
|
+
var _a;
|
|
35613
35628
|
const positiveValues = new Map(),
|
|
35614
35629
|
negativeValues = new Map(),
|
|
35615
35630
|
needSum = options.asPercentStack || options.asPrevPercentStack || options.asPercent || options.asSum,
|
|
35616
|
-
|
|
35631
|
+
orient = null !== (_a = options.orient) && void 0 !== _a ? _a : "positive",
|
|
35632
|
+
data = "negative" === orient ? upstreamData.slice().reverse() : upstreamData,
|
|
35617
35633
|
defaultDimValue = Symbol("dim");
|
|
35618
35634
|
let stackedValues = data.map(datum => {
|
|
35619
35635
|
var _a, _b, _c;
|
|
@@ -35644,7 +35660,7 @@
|
|
|
35644
35660
|
newDatum = Object.assign({}, datum),
|
|
35645
35661
|
sum = null !== (_a = (value >= 0 ? positiveValues : negativeValues).get(dimension)) && void 0 !== _a ? _a : 0;
|
|
35646
35662
|
return options.asSum && (newDatum[options.asSum] = sum), options.asPercent && (newDatum[options.asPercent] = 0 === sum ? 0 : value / sum), options.asPercentStack && (newDatum[options.asPercentStack] = 0 === sum ? 0 : stack / sum), options.asPrevPercentStack && (newDatum[options.asPrevPercentStack] = 0 === sum ? 0 : prevStack / sum), options.asPrevStack && (newDatum[options.asPrevStack] = prevStack), newDatum[null !== (_b = options.asStack) && void 0 !== _b ? _b : options.stackField] = stack, newDatum;
|
|
35647
|
-
})), "negative" ===
|
|
35663
|
+
})), "negative" === orient ? stackedValues.reverse() : stackedValues;
|
|
35648
35664
|
};
|
|
35649
35665
|
|
|
35650
35666
|
const transform$8 = (options, upstreamData) => {
|
|
@@ -36115,9 +36131,9 @@
|
|
|
36115
36131
|
}
|
|
36116
36132
|
}],
|
|
36117
36133
|
[GrammarMarkType.area]: [{
|
|
36118
|
-
channels: ["x", "y", "x1", "y1"
|
|
36134
|
+
channels: ["x", "y", "x1", "y1"],
|
|
36119
36135
|
transform: (graphicAttributes, nextAttrs, storedAttrs) => {
|
|
36120
|
-
graphicAttributes.x = 0, graphicAttributes.y = 0;
|
|
36136
|
+
graphicAttributes.x = 0, graphicAttributes.y = 0, graphicAttributes.x1 = 0, graphicAttributes.y1 = 0;
|
|
36121
36137
|
}
|
|
36122
36138
|
}],
|
|
36123
36139
|
[GrammarMarkType.line]: [{
|
|
@@ -37947,7 +37963,7 @@
|
|
|
37947
37963
|
y: y
|
|
37948
37964
|
}
|
|
37949
37965
|
};
|
|
37950
|
-
return isValidNumber(min) && (animateAttributes.to.min = center, animateAttributes.from.min = min), isValidNumber(max) && (animateAttributes.to.max = center, animateAttributes.from.max = max), isValidNumber(q1) && (animateAttributes.to.q1 = center, animateAttributes.from.q1 = q1), isValidNumber(q3) && (animateAttributes.to.q3 = center, animateAttributes.from.q3 = q3), isValidNumber(median) && (animateAttributes.to.median = center, animateAttributes.from.median =
|
|
37966
|
+
return isValidNumber(min) && (animateAttributes.to.min = center, animateAttributes.from.min = min), isValidNumber(max) && (animateAttributes.to.max = center, animateAttributes.from.max = max), isValidNumber(q1) && (animateAttributes.to.q1 = center, animateAttributes.from.q1 = q1), isValidNumber(q3) && (animateAttributes.to.q3 = center, animateAttributes.from.q3 = q3), isValidNumber(median) && (animateAttributes.to.median = center, animateAttributes.from.median = median), animateAttributes;
|
|
37951
37967
|
},
|
|
37952
37968
|
computeBoxplotCenter = (glyphElement, direction, options) => {
|
|
37953
37969
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
@@ -38033,6 +38049,8 @@
|
|
|
38033
38049
|
x1: x + width / 2
|
|
38034
38050
|
}))), attributes;
|
|
38035
38051
|
};
|
|
38052
|
+
const boxplotScaleIn = scaleIn(computeBoxplotCenter);
|
|
38053
|
+
const boxplotScaleOut = scaleOut(computeBoxplotCenter);
|
|
38036
38054
|
function registerBoxplotGlyph() {
|
|
38037
38055
|
registerGlyph("boxplot", {
|
|
38038
38056
|
shaft: "rule",
|
|
@@ -38150,7 +38168,7 @@
|
|
|
38150
38168
|
median: {
|
|
38151
38169
|
visible: !1
|
|
38152
38170
|
}
|
|
38153
|
-
})), registerAnimationType("boxplotScaleIn",
|
|
38171
|
+
})), registerAnimationType("boxplotScaleIn", boxplotScaleIn), registerAnimationType("boxplotScaleOut", boxplotScaleOut);
|
|
38154
38172
|
}
|
|
38155
38173
|
const computeBarBoxplotCenter = (glyphElement, direction, options) => {
|
|
38156
38174
|
var _a, _b, _c, _d;
|
|
@@ -38228,6 +38246,8 @@
|
|
|
38228
38246
|
x1: x + width / 2
|
|
38229
38247
|
}))), attributes;
|
|
38230
38248
|
};
|
|
38249
|
+
const barBoxplotScaleIn = scaleIn(computeBarBoxplotCenter);
|
|
38250
|
+
const barBoxplotScaleOut = scaleOut(computeBarBoxplotCenter);
|
|
38231
38251
|
function registerBarBoxplotGlyph() {
|
|
38232
38252
|
registerGlyph("barBoxplot", {
|
|
38233
38253
|
minMaxBox: "rect",
|
|
@@ -38322,7 +38342,7 @@
|
|
|
38322
38342
|
median: {
|
|
38323
38343
|
visible: !1
|
|
38324
38344
|
}
|
|
38325
|
-
})), registerAnimationType("barBoxplotScaleIn",
|
|
38345
|
+
})), registerAnimationType("barBoxplotScaleIn", barBoxplotScaleIn), registerAnimationType("barBoxplotScaleOut", barBoxplotScaleOut);
|
|
38326
38346
|
}
|
|
38327
38347
|
|
|
38328
38348
|
const getHorizontalPath = (options, ratio) => {
|
|
@@ -38573,7 +38593,7 @@
|
|
|
38573
38593
|
Object.keys(from).forEach(channel => {
|
|
38574
38594
|
isNil(from[channel]) && delete from[channel];
|
|
38575
38595
|
});
|
|
38576
|
-
const computePoints = isValidPointsChannel(Object.keys(from), element.mark.markType);
|
|
38596
|
+
const computePoints = isValidPointsChannel(Object.keys(from), element.mark.markType) && !isValid(from.segments);
|
|
38577
38597
|
if (computePoints) {
|
|
38578
38598
|
const items = element.items.map(item => Object.assign({}, item, {
|
|
38579
38599
|
nextAttrs: from
|
|
@@ -38586,7 +38606,7 @@
|
|
|
38586
38606
|
Object.keys(to).forEach(channel => {
|
|
38587
38607
|
isNil(to[channel]) && delete to[channel];
|
|
38588
38608
|
});
|
|
38589
|
-
const computePoints = isValidPointsChannel(Object.keys(to), element.mark.markType);
|
|
38609
|
+
const computePoints = isValidPointsChannel(Object.keys(to), element.mark.markType) && !isValid(to.segments);
|
|
38590
38610
|
if (computePoints) {
|
|
38591
38611
|
const items = element.items.map(item => Object.assign({}, item, {
|
|
38592
38612
|
nextAttrs: to
|
|
@@ -39396,10 +39416,11 @@
|
|
|
39396
39416
|
});
|
|
39397
39417
|
}
|
|
39398
39418
|
encodeCustom(nextAttrs) {
|
|
39419
|
+
var _a;
|
|
39399
39420
|
let customEncodeValues = {};
|
|
39400
39421
|
const channelEncoder = this.glyphMeta.getChannelEncoder(),
|
|
39401
39422
|
functionEncoder = this.glyphMeta.getFunctionEncoder();
|
|
39402
|
-
if (functionEncoder && (customEncodeValues = functionEncoder.call(null, nextAttrs, this.getDatum(), this, this.mark.getGlyphConfig())), channelEncoder) {
|
|
39423
|
+
if (functionEncoder && (customEncodeValues = functionEncoder.call(null, Object.assign({}, null === (_a = this.graphicItem) || void 0 === _a ? void 0 : _a.attribute, nextAttrs), this.getDatum(), this, this.mark.getGlyphConfig())), channelEncoder) {
|
|
39403
39424
|
let allAttrs;
|
|
39404
39425
|
Object.keys(channelEncoder).forEach(channel => {
|
|
39405
39426
|
var _a;
|
|
@@ -39785,7 +39806,7 @@
|
|
|
39785
39806
|
}
|
|
39786
39807
|
getScalesByChannel() {
|
|
39787
39808
|
const encoders = this.spec.encode;
|
|
39788
|
-
if (!encoders) return;
|
|
39809
|
+
if (!encoders) return {};
|
|
39789
39810
|
const res = {},
|
|
39790
39811
|
params = this.parameters();
|
|
39791
39812
|
return Object.keys(encoders).forEach(state => {
|
|
@@ -41365,6 +41386,24 @@
|
|
|
41365
41386
|
function defaultLabelPosition(type) {
|
|
41366
41387
|
return "rect" === type ? DefaultRectPositions : DefaultPositions;
|
|
41367
41388
|
}
|
|
41389
|
+
function clampText(text, width, height) {
|
|
41390
|
+
const {
|
|
41391
|
+
x1: x1,
|
|
41392
|
+
x2: x2,
|
|
41393
|
+
y1: y1,
|
|
41394
|
+
y2: y2
|
|
41395
|
+
} = text.AABBBounds,
|
|
41396
|
+
minX = Math.min(x1, x2),
|
|
41397
|
+
maxX = Math.max(x1, x2),
|
|
41398
|
+
minY = Math.min(y1, y2),
|
|
41399
|
+
maxY = Math.max(y1, y2);
|
|
41400
|
+
let dx = 0,
|
|
41401
|
+
dy = 0;
|
|
41402
|
+
return minX < 0 && maxX - minX <= width ? dx = -minX : maxX > width && minX - (maxX - width) >= 0 && (dx = width - maxX), minY < 0 && maxY - minY <= height ? dy = -minY : maxY > height && minY - (maxY - height) >= 0 && (dy = height - maxY), {
|
|
41403
|
+
dx: dx,
|
|
41404
|
+
dy: dy
|
|
41405
|
+
};
|
|
41406
|
+
}
|
|
41368
41407
|
|
|
41369
41408
|
const fadeIn = function () {
|
|
41370
41409
|
let textAttribute = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
@@ -41443,9 +41482,17 @@
|
|
|
41443
41482
|
this._bmpTool = bmpTool;
|
|
41444
41483
|
}
|
|
41445
41484
|
render() {
|
|
41446
|
-
|
|
41447
|
-
|
|
41448
|
-
|
|
41485
|
+
this._prepare();
|
|
41486
|
+
const {
|
|
41487
|
+
overlap: overlap,
|
|
41488
|
+
smartInvert: smartInvert,
|
|
41489
|
+
dataFilter: dataFilter,
|
|
41490
|
+
customLayoutFunc: customLayoutFunc,
|
|
41491
|
+
customOverlapFunc: customOverlapFunc
|
|
41492
|
+
} = this.attribute;
|
|
41493
|
+
let labels,
|
|
41494
|
+
data = this.attribute.data;
|
|
41495
|
+
isFunction(dataFilter) && (data = dataFilter(data)), isFunction(customLayoutFunc) ? labels = customLayoutFunc(data, d => this._idToGraphic.get(d.id)) : (labels = this.layout(data), isFunction(customOverlapFunc) ? labels = customOverlapFunc(labels, d => this._idToGraphic.get(d.id)) : !1 !== overlap && (labels = this._overlapping(labels))), !1 !== smartInvert && this._smartInvert(labels), this._renderLabels(labels);
|
|
41449
41496
|
}
|
|
41450
41497
|
_bindEvent(target) {
|
|
41451
41498
|
if (!target) return;
|
|
@@ -41464,52 +41511,53 @@
|
|
|
41464
41511
|
const text = createText(attributes);
|
|
41465
41512
|
return this._bindEvent(text), this._setStates(text), text;
|
|
41466
41513
|
}
|
|
41467
|
-
|
|
41514
|
+
_prepare() {
|
|
41468
41515
|
var _a;
|
|
41469
41516
|
const baseMarks = this.getBaseMarks(),
|
|
41470
41517
|
currentBaseMarks = [];
|
|
41471
|
-
|
|
41518
|
+
if (baseMarks.forEach(mark => {
|
|
41472
41519
|
"willRelease" !== mark.releaseStatus && currentBaseMarks.push(mark);
|
|
41473
|
-
}),
|
|
41474
|
-
}
|
|
41475
|
-
layout(currentMarks) {
|
|
41520
|
+
}), null === (_a = this._idToGraphic) || void 0 === _a || _a.clear(), this._baseMarks = currentBaseMarks, !currentBaseMarks || 0 === currentBaseMarks.length) return;
|
|
41476
41521
|
const {
|
|
41477
|
-
textStyle: textStyle,
|
|
41478
|
-
position: position,
|
|
41479
|
-
offset: offset
|
|
41480
|
-
} = this.attribute;
|
|
41481
|
-
let {
|
|
41482
41522
|
data: data
|
|
41483
41523
|
} = this.attribute;
|
|
41484
|
-
if (
|
|
41485
|
-
|
|
41486
|
-
|
|
41524
|
+
if (data && 0 !== data.length) {
|
|
41525
|
+
this._idToGraphic || (this._idToGraphic = new Map());
|
|
41526
|
+
for (let i = 0; i < currentBaseMarks.length; i++) {
|
|
41527
|
+
const textData = data[i],
|
|
41528
|
+
baseMark = currentBaseMarks[i];
|
|
41529
|
+
textData && baseMark && (isValid(textData.id) || (textData.id = `vrender-component-${this.name}-${i}`), this._idToGraphic.set(textData.id, baseMark));
|
|
41530
|
+
}
|
|
41531
|
+
}
|
|
41532
|
+
}
|
|
41533
|
+
layout() {
|
|
41534
|
+
let data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
41535
|
+
const {
|
|
41536
|
+
textStyle = {},
|
|
41537
|
+
position: position,
|
|
41538
|
+
offset: offset
|
|
41539
|
+
} = this.attribute,
|
|
41540
|
+
labels = [];
|
|
41487
41541
|
for (let i = 0; i < data.length; i++) {
|
|
41488
41542
|
const textData = data[i],
|
|
41489
|
-
baseMark =
|
|
41490
|
-
labelAttribute = Object.assign(Object.assign(
|
|
41491
|
-
|
|
41492
|
-
|
|
41493
|
-
|
|
41494
|
-
|
|
41495
|
-
|
|
41496
|
-
|
|
41497
|
-
|
|
41498
|
-
|
|
41499
|
-
y: textData.y
|
|
41500
|
-
}),
|
|
41501
|
-
textAttributes = this.labeling(textBounds, graphicBounds, isFunction(position) ? position(textData) : position, offset);
|
|
41502
|
-
if (!textAttributes) continue;
|
|
41503
|
-
labelAttribute.x = textAttributes.x, labelAttribute.y = textAttributes.y, labels.push(labelAttribute);
|
|
41504
|
-
}
|
|
41543
|
+
baseMark = this._idToGraphic.get(textData.id),
|
|
41544
|
+
labelAttribute = Object.assign(Object.assign({}, textStyle), textData),
|
|
41545
|
+
text = this._createLabelText(labelAttribute),
|
|
41546
|
+
textBounds = this.getGraphicBounds(text),
|
|
41547
|
+
graphicBounds = this.getGraphicBounds(baseMark, {
|
|
41548
|
+
x: textData.x,
|
|
41549
|
+
y: textData.y
|
|
41550
|
+
}),
|
|
41551
|
+
textLocation = this.labeling(textBounds, graphicBounds, isFunction(position) ? position(textData) : position, offset);
|
|
41552
|
+
textLocation && (labelAttribute.x = textLocation.x, labelAttribute.y = textLocation.y, text.setAttributes(textLocation), labels.push(text));
|
|
41505
41553
|
}
|
|
41506
|
-
return
|
|
41554
|
+
return labels;
|
|
41507
41555
|
}
|
|
41508
|
-
|
|
41509
|
-
|
|
41510
|
-
var _a, _b, _c, _d, _e;
|
|
41556
|
+
_overlapping(labels) {
|
|
41557
|
+
var _a, _b, _c, _d;
|
|
41511
41558
|
if (0 === labels.length) return [];
|
|
41512
|
-
const
|
|
41559
|
+
const option = this.attribute.overlap,
|
|
41560
|
+
result = [],
|
|
41513
41561
|
baseMarkGroup = this.getBaseMarkGroup(),
|
|
41514
41562
|
size = null !== (_a = option.size) && void 0 !== _a ? _a : {
|
|
41515
41563
|
width: null !== (_b = null == baseMarkGroup ? void 0 : baseMarkGroup.AABBBounds.width()) && void 0 !== _b ? _b : 0,
|
|
@@ -41530,27 +41578,45 @@
|
|
|
41530
41578
|
}));
|
|
41531
41579
|
for (let i = 0; i < labels.length; i++) {
|
|
41532
41580
|
if (!1 === labels[i].visible) continue;
|
|
41533
|
-
const text =
|
|
41534
|
-
baseMark =
|
|
41581
|
+
const text = labels[i],
|
|
41582
|
+
baseMark = this._idToGraphic.get(text.attribute.id);
|
|
41535
41583
|
if (text.update(), canPlace(bmpTool, bitmap, text.AABBBounds, clampForce)) {
|
|
41536
41584
|
if (!checkBounds) {
|
|
41537
|
-
bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, !0)), result.push(
|
|
41585
|
+
bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, !0)), result.push(text);
|
|
41538
41586
|
continue;
|
|
41539
41587
|
}
|
|
41540
41588
|
if (checkBounds && (null == baseMark ? void 0 : baseMark.AABBBounds) && canPlaceInside(text.AABBBounds, null == baseMark ? void 0 : baseMark.AABBBounds)) {
|
|
41541
|
-
bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, !0)), result.push(
|
|
41589
|
+
bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, !0)), result.push(text);
|
|
41542
41590
|
continue;
|
|
41543
41591
|
}
|
|
41544
41592
|
}
|
|
41545
41593
|
let hasPlace = !1;
|
|
41546
41594
|
for (let j = 0; j < strategy.length; j++) if (hasPlace = place$2(bmpTool, bitmap, strategy[j], this.attribute, text, this.getGraphicBounds(baseMark, labels[i]), this.labeling), !1 !== hasPlace) {
|
|
41547
|
-
|
|
41595
|
+
text.setAttributes({
|
|
41548
41596
|
x: hasPlace.x,
|
|
41549
41597
|
y: hasPlace.y
|
|
41550
|
-
}));
|
|
41598
|
+
}), result.push(text);
|
|
41551
41599
|
break;
|
|
41552
41600
|
}
|
|
41553
|
-
|
|
41601
|
+
if (clampForce) {
|
|
41602
|
+
const {
|
|
41603
|
+
dx = 0,
|
|
41604
|
+
dy = 0
|
|
41605
|
+
} = clampText(text, bmpTool.width, bmpTool.height);
|
|
41606
|
+
if ((0 !== dx || 0 !== dy) && canPlace(bmpTool, bitmap, {
|
|
41607
|
+
x1: text.AABBBounds.x1 + dx,
|
|
41608
|
+
x2: text.AABBBounds.x2 + dx,
|
|
41609
|
+
y1: text.AABBBounds.y1 + dy,
|
|
41610
|
+
y2: text.AABBBounds.y2 + dy
|
|
41611
|
+
})) {
|
|
41612
|
+
text.setAttributes({
|
|
41613
|
+
x: text.attribute.x + dx,
|
|
41614
|
+
y: text.attribute.y + dy
|
|
41615
|
+
}), bitmap.setRange(boundToRange(bmpTool, text.AABBBounds, !0)), result.push(text);
|
|
41616
|
+
continue;
|
|
41617
|
+
}
|
|
41618
|
+
}
|
|
41619
|
+
!hasPlace && !hideOnHit && result.push(text);
|
|
41554
41620
|
}
|
|
41555
41621
|
return isFunction(this.onAfterLabelOverlap) && this.onAfterLabelOverlap(bitmap), result;
|
|
41556
41622
|
}
|
|
@@ -41582,17 +41648,16 @@
|
|
|
41582
41648
|
easing = null !== (_d = animationConfig.easing) && void 0 !== _d ? _d : DefaultLabelAnimation.easing,
|
|
41583
41649
|
delay = null !== (_e = animationConfig.delay) && void 0 !== _e ? _e : 0,
|
|
41584
41650
|
currentTextMap = new Map(),
|
|
41585
|
-
prevTextMap = this.
|
|
41651
|
+
prevTextMap = this._graphicToText || new Map(),
|
|
41586
41652
|
texts = [];
|
|
41587
|
-
labels.forEach((
|
|
41588
|
-
const
|
|
41589
|
-
relatedGraphic = this._relationMap.get(label._relatedIndex),
|
|
41653
|
+
labels.forEach((text, index) => {
|
|
41654
|
+
const relatedGraphic = this._idToGraphic.get(text.attribute.id),
|
|
41590
41655
|
state = (null == prevTextMap ? void 0 : prevTextMap.get(relatedGraphic)) ? "update" : "enter";
|
|
41591
41656
|
if ("enter" === state) if (texts.push(text), currentTextMap.set(relatedGraphic, text), !disableAnimation && relatedGraphic) {
|
|
41592
41657
|
const {
|
|
41593
41658
|
from: from,
|
|
41594
41659
|
to: to
|
|
41595
|
-
} = getAnimationAttributes(
|
|
41660
|
+
} = getAnimationAttributes(text.attribute, "fadeIn");
|
|
41596
41661
|
this.add(text), relatedGraphic.onAnimateBind = () => {
|
|
41597
41662
|
text.setAttributes(from);
|
|
41598
41663
|
const listener = this._afterRelatedGraphicAttributeUpdate(text, texts, index, relatedGraphic, {
|
|
@@ -41617,7 +41682,7 @@
|
|
|
41617
41682
|
disableAnimation ? this.removeChild(label) : null == label || label.animate().to(getAnimationAttributes(label.attribute, "fadeOut").to, duration, easing).onEnd(() => {
|
|
41618
41683
|
this.removeChild(label);
|
|
41619
41684
|
});
|
|
41620
|
-
}), this.
|
|
41685
|
+
}), this._graphicToText = currentTextMap;
|
|
41621
41686
|
}
|
|
41622
41687
|
_afterRelatedGraphicAttributeUpdate(text, texts, index, relatedGraphic, _ref) {
|
|
41623
41688
|
let {
|
|
@@ -41660,21 +41725,32 @@
|
|
|
41660
41725
|
return listener;
|
|
41661
41726
|
}
|
|
41662
41727
|
_smartInvert(labels) {
|
|
41663
|
-
|
|
41664
|
-
|
|
41665
|
-
|
|
41728
|
+
const option = this.attribute.smartInvert || {},
|
|
41729
|
+
{
|
|
41730
|
+
textType: textType,
|
|
41731
|
+
contrastRatiosThreshold: contrastRatiosThreshold,
|
|
41732
|
+
alternativeColors: alternativeColors
|
|
41733
|
+
} = option;
|
|
41734
|
+
for (let i = 0; i < labels.length; i++) {
|
|
41735
|
+
const label = labels[i];
|
|
41666
41736
|
if (!label) continue;
|
|
41667
|
-
const
|
|
41668
|
-
|
|
41669
|
-
|
|
41670
|
-
|
|
41671
|
-
|
|
41672
|
-
|
|
41673
|
-
|
|
41674
|
-
label.
|
|
41675
|
-
|
|
41676
|
-
|
|
41677
|
-
|
|
41737
|
+
const baseMark = this._idToGraphic.get(label.attribute.id),
|
|
41738
|
+
isInside = canPlaceInside(label.AABBBounds, null == baseMark ? void 0 : baseMark.AABBBounds);
|
|
41739
|
+
if (label.attribute.stroke && label.attribute.lineWidth > 0) label.setAttributes({
|
|
41740
|
+
fill: labelSmartInvert(label.attribute.fill, label.attribute.stroke, textType, contrastRatiosThreshold, alternativeColors)
|
|
41741
|
+
});else if (isInside) {
|
|
41742
|
+
const backgroundColor = baseMark.attribute.fill,
|
|
41743
|
+
foregroundColor = label.attribute.fill;
|
|
41744
|
+
label.setAttributes({
|
|
41745
|
+
fill: labelSmartInvert(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, alternativeColors)
|
|
41746
|
+
});
|
|
41747
|
+
} else if (label.attribute.lineWidth > 0) {
|
|
41748
|
+
const backgroundColor = label.attribute.stroke,
|
|
41749
|
+
foregroundColor = label.attribute.fill;
|
|
41750
|
+
label.setAttributes({
|
|
41751
|
+
stroke: baseMark.attribute.fill,
|
|
41752
|
+
fill: labelSmartInvert(foregroundColor, backgroundColor, textType, contrastRatiosThreshold, alternativeColors)
|
|
41753
|
+
});
|
|
41678
41754
|
}
|
|
41679
41755
|
}
|
|
41680
41756
|
}
|
|
@@ -42057,6 +42133,9 @@
|
|
|
42057
42133
|
line.name = "line", line.id = this._getNodeId("line"), isEmpty(null == state ? void 0 : state.line) || (line.states = state.line), this.line = line, this.add(line);
|
|
42058
42134
|
}
|
|
42059
42135
|
renderSymbol(attribute, dim) {
|
|
42136
|
+
const {
|
|
42137
|
+
autoRotate = !0
|
|
42138
|
+
} = attribute;
|
|
42060
42139
|
let symbol;
|
|
42061
42140
|
if (null == attribute ? void 0 : attribute.visible) {
|
|
42062
42141
|
const startAngle = this._startAngle,
|
|
@@ -42085,7 +42164,7 @@
|
|
|
42085
42164
|
}, rotate = endAngle + Math.PI / 2), symbol = createSymbol(Object.assign(Object.assign(Object.assign({}, position), {
|
|
42086
42165
|
symbolType: symbolType,
|
|
42087
42166
|
size: size,
|
|
42088
|
-
angle: rotate + refAngle,
|
|
42167
|
+
angle: autoRotate ? rotate + refAngle : 0,
|
|
42089
42168
|
strokeBoundsBuffer: 0
|
|
42090
42169
|
}), style)), symbol.name = `${dim}-symbol`, symbol.id = this._getNodeId(`${dim}-symbol`), isEmpty(null == state ? void 0 : state.symbol) || (symbol.states = state.symbol), this.add(symbol);
|
|
42091
42170
|
}
|
|
@@ -42106,6 +42185,7 @@
|
|
|
42106
42185
|
},
|
|
42107
42186
|
startSymbol: {
|
|
42108
42187
|
visible: !1,
|
|
42188
|
+
autoRotate: !0,
|
|
42109
42189
|
symbolType: "triangle",
|
|
42110
42190
|
size: 12,
|
|
42111
42191
|
refX: 0,
|
|
@@ -42118,6 +42198,7 @@
|
|
|
42118
42198
|
},
|
|
42119
42199
|
endSymbol: {
|
|
42120
42200
|
visible: !1,
|
|
42201
|
+
autoRotate: !0,
|
|
42121
42202
|
symbolType: "triangle",
|
|
42122
42203
|
size: 12,
|
|
42123
42204
|
refX: 0,
|
|
@@ -43506,13 +43587,14 @@
|
|
|
43506
43587
|
previewCallbackX: previewCallbackX,
|
|
43507
43588
|
previewCallbackY: previewCallbackY,
|
|
43508
43589
|
previewCallbackX1: previewCallbackX1,
|
|
43509
|
-
previewCallbackY1: previewCallbackY1
|
|
43590
|
+
previewCallbackY1: previewCallbackY1,
|
|
43591
|
+
updateStateCallback: updateStateCallback
|
|
43510
43592
|
} = this.attribute,
|
|
43511
43593
|
{
|
|
43512
43594
|
width: width,
|
|
43513
43595
|
height: height
|
|
43514
43596
|
} = size;
|
|
43515
|
-
start && (this.state.start = start), end && (this.state.end = end), this._isHorizontal = "top" === orient || "bottom" === orient, this._layoutCache.max = this._isHorizontal ? width : height, this._layoutCache.attPos = this._isHorizontal ? "x" : "y", this._layoutCache.attSize = this._isHorizontal ? "width" : "height", this._activeCache.startPos = position, this._activeCache.lastPos = position, this._showText = "auto" !== showDetail && showDetail, previewData && (this._previewData = previewData), isFunction(previewCallbackX) && (this._previewCallbackX = previewCallbackX), isFunction(previewCallbackY) && (this._previewCallbackY = previewCallbackY), isFunction(previewCallbackX1) && (this._previewCallbackX1 = previewCallbackX1), isFunction(previewCallbackY1) && (this._previewCallbackY1 = previewCallbackY1);
|
|
43597
|
+
start && (this.state.start = start), end && (this.state.end = end), this._isHorizontal = "top" === orient || "bottom" === orient, this._layoutCache.max = this._isHorizontal ? width : height, this._layoutCache.attPos = this._isHorizontal ? "x" : "y", this._layoutCache.attSize = this._isHorizontal ? "width" : "height", this._activeCache.startPos = position, this._activeCache.lastPos = position, this._showText = "auto" !== showDetail && showDetail, previewData && (this._previewData = previewData), isFunction(previewCallbackX) && (this._previewCallbackX = previewCallbackX), isFunction(previewCallbackY) && (this._previewCallbackY = previewCallbackY), isFunction(previewCallbackX1) && (this._previewCallbackX1 = previewCallbackX1), isFunction(previewCallbackY1) && (this._previewCallbackY1 = previewCallbackY1), isFunction(updateStateCallback) && (this._updateStateCallback = updateStateCallback);
|
|
43516
43598
|
}
|
|
43517
43599
|
bindEvents() {
|
|
43518
43600
|
const {
|
|
@@ -43942,10 +44024,10 @@
|
|
|
43942
44024
|
start: startAttr,
|
|
43943
44025
|
end: endAttr
|
|
43944
44026
|
} = this.attribute;
|
|
43945
|
-
isValid(start) && isValid(end) && (start !== this.state.start || end !== this.state.end) && (this.state.start = start, this.state.end = end, startAttr === this.state.start && endAttr === this.state.end || this.setAttributes({
|
|
44027
|
+
isValid(start) && isValid(end) && (start !== this.state.start || end !== this.state.end) && (this.state.start = start, this.state.end = end, startAttr === this.state.start && endAttr === this.state.end || (this.setAttributes({
|
|
43946
44028
|
start: start,
|
|
43947
44029
|
end: end
|
|
43948
|
-
}));
|
|
44030
|
+
}), this._updateStateCallback && this._updateStateCallback(start, end)));
|
|
43949
44031
|
}
|
|
43950
44032
|
setPreviewData(data) {
|
|
43951
44033
|
this._previewData = data;
|
|
@@ -44986,7 +45068,7 @@
|
|
|
44986
45068
|
const innerGroupBounds = innerGroup.AABBBounds,
|
|
44987
45069
|
innerGroupWidth = innerGroupBounds.width(),
|
|
44988
45070
|
innerGroupHeight = innerGroupBounds.height(),
|
|
44989
|
-
itemGroupWidth = this.
|
|
45071
|
+
itemGroupWidth = isValid(this.attribute.item.width) ? this.attribute.item.width : innerGroupWidth + parsedPadding[1] + parsedPadding[3],
|
|
44990
45072
|
itemGroupHeight = this._itemHeightByUser || innerGroupHeight + parsedPadding[0] + parsedPadding[2];
|
|
44991
45073
|
return itemGroup.attribute.width = itemGroupWidth, itemGroup.attribute.height = itemGroupHeight, innerGroup.translateTo(-innerGroupBounds.x1 + parsedPadding[3], -innerGroupBounds.y1 + parsedPadding[0]), itemGroup;
|
|
44992
45074
|
}
|
|
@@ -47789,7 +47871,7 @@
|
|
|
47789
47871
|
super(view, ComponentEnum.axis, group), this.spec.componentType = ComponentEnum.axis, this.spec.axisType = "line", this.mode = mode;
|
|
47790
47872
|
}
|
|
47791
47873
|
parseAddition(spec) {
|
|
47792
|
-
return super.parseAddition(spec), this.tickCount(spec.tickCount), this.inside(spec.inside), this.baseValue(spec.baseValue), this;
|
|
47874
|
+
return super.parseAddition(spec), this.axisType(spec.axisType), this.tickCount(spec.tickCount), this.inside(spec.inside), this.baseValue(spec.baseValue), this;
|
|
47793
47875
|
}
|
|
47794
47876
|
axisType(axisType) {
|
|
47795
47877
|
return this.spec.axisType = axisType, this._axisComponentType = null, this._prepareRejoin(), this.commit(), this;
|
|
@@ -58028,7 +58110,7 @@
|
|
|
58028
58110
|
VChart.useMark([ComponentMark, GroupMark, ImageMark]);
|
|
58029
58111
|
Factory.registerRegion('region', Region);
|
|
58030
58112
|
Factory.registerLayout('base', Layout);
|
|
58031
|
-
const version = "1.1.
|
|
58113
|
+
const version = "1.1.3";
|
|
58032
58114
|
Logger.getInstance(LoggerLevel.Error);
|
|
58033
58115
|
|
|
58034
58116
|
var SeriesMarkNameEnum;
|
|
@@ -64919,7 +65001,7 @@
|
|
|
64919
65001
|
coordinate = 'geo';
|
|
64920
65002
|
_mapViewData;
|
|
64921
65003
|
getMapViewData() {
|
|
64922
|
-
return this._mapViewData
|
|
65004
|
+
return this._mapViewData?.getDataView();
|
|
64923
65005
|
}
|
|
64924
65006
|
_mapViewDataStatistics;
|
|
64925
65007
|
_nameField;
|
|
@@ -65269,7 +65351,9 @@
|
|
|
65269
65351
|
spec?.nameMap !== nameMap ||
|
|
65270
65352
|
spec?.valueField !== valueField ||
|
|
65271
65353
|
spec?.nameProperty !== nameProperty) {
|
|
65354
|
+
result.change = true;
|
|
65272
65355
|
result.reRender = true;
|
|
65356
|
+
result.reMake = true;
|
|
65273
65357
|
}
|
|
65274
65358
|
return result;
|
|
65275
65359
|
}
|
|
@@ -68798,7 +68882,7 @@
|
|
|
68798
68882
|
for (this.data = data; i < n;) {
|
|
68799
68883
|
if (this.layoutWord(i) && i++, this.progressiveIndex = i, this.exceedTime()) break;
|
|
68800
68884
|
}
|
|
68801
|
-
if (!this.options.clip && this.options.enlarge && this.shrinkBoard(this._bounds), ["cardioid", "triangle", "triangle-upright"].includes(this.options.shape)) {
|
|
68885
|
+
if (!this.options.clip && this.options.enlarge && this._bounds && this.shrinkBoard(this._bounds), this._bounds && ["cardioid", "triangle", "triangle-upright"].includes(this.options.shape)) {
|
|
68802
68886
|
const currentCenterY = (this._bounds[0].y + this._bounds[1].y) / 2;
|
|
68803
68887
|
this._dy = -(currentCenterY - this._size[1] / 2);
|
|
68804
68888
|
}
|
|
@@ -69323,8 +69407,9 @@
|
|
|
69323
69407
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
69324
69408
|
if (options.size && (!options.size[0] || !options.size[1])) return upstreamData;
|
|
69325
69409
|
const data = upstreamData,
|
|
69326
|
-
canvasSize = null !== (_a = options.size) && void 0 !== _a ? _a : [500, 500]
|
|
69327
|
-
|
|
69410
|
+
canvasSize = (null !== (_a = options.size) && void 0 !== _a ? _a : [500, 500]).slice();
|
|
69411
|
+
canvasSize[0] = Math.floor(canvasSize[0]), canvasSize[1] = Math.floor(canvasSize[1]);
|
|
69412
|
+
const fontFamily = options.fontFamily ? field$1(options.fontFamily) : "sans-serif",
|
|
69328
69413
|
fontStyle = options.fontStyle ? field$1(options.fontStyle) : "normal",
|
|
69329
69414
|
fontWeight = options.fontWeight ? field$1(options.fontWeight) : "normal",
|
|
69330
69415
|
rotate = options.rotate ? field$1(options.rotate) : 0,
|
|
@@ -70778,6 +70863,16 @@
|
|
|
70778
70863
|
}
|
|
70779
70864
|
setValueFieldToPercent() {
|
|
70780
70865
|
}
|
|
70866
|
+
updateSpec(spec) {
|
|
70867
|
+
const originalSpec = this._originalSpec;
|
|
70868
|
+
const result = super.updateSpec(spec);
|
|
70869
|
+
if (!isEqual$1(originalSpec, spec)) {
|
|
70870
|
+
result.reMake = true;
|
|
70871
|
+
result.reCompile = true;
|
|
70872
|
+
return result;
|
|
70873
|
+
}
|
|
70874
|
+
return result;
|
|
70875
|
+
}
|
|
70781
70876
|
}
|
|
70782
70877
|
|
|
70783
70878
|
class WordCloudSeries extends BaseWordCloudSeries {
|
|
@@ -73793,6 +73888,29 @@
|
|
|
73793
73888
|
else {
|
|
73794
73889
|
data = data[0];
|
|
73795
73890
|
}
|
|
73891
|
+
if (op.sourceField !== 'source' || op.targetField !== 'target') {
|
|
73892
|
+
for (const key in data) {
|
|
73893
|
+
if (key === 'links') {
|
|
73894
|
+
const updatedData = [];
|
|
73895
|
+
data[key].forEach((datum) => {
|
|
73896
|
+
const updatedDatum = {};
|
|
73897
|
+
for (const key in datum) {
|
|
73898
|
+
if (key === op.sourceField) {
|
|
73899
|
+
updatedDatum.source = datum[op.sourceField];
|
|
73900
|
+
}
|
|
73901
|
+
else if (key === op.targetField) {
|
|
73902
|
+
updatedDatum.target = datum[op.targetField];
|
|
73903
|
+
}
|
|
73904
|
+
else {
|
|
73905
|
+
updatedDatum[key] = datum[key];
|
|
73906
|
+
}
|
|
73907
|
+
}
|
|
73908
|
+
updatedData.push(updatedDatum);
|
|
73909
|
+
});
|
|
73910
|
+
data[key] = updatedData;
|
|
73911
|
+
}
|
|
73912
|
+
}
|
|
73913
|
+
}
|
|
73796
73914
|
const layout = new SankeyLayout(op);
|
|
73797
73915
|
const result = [];
|
|
73798
73916
|
result.push(layout.layout(data, view));
|
|
@@ -73972,13 +74090,15 @@
|
|
|
73972
74090
|
y1: this._viewBox.y2
|
|
73973
74091
|
};
|
|
73974
74092
|
},
|
|
74093
|
+
sourceField: this._spec.sourceField,
|
|
74094
|
+
targetField: this._spec.targetField,
|
|
73975
74095
|
direction: this._spec.direction,
|
|
73976
|
-
nodeAlign: this._spec.nodeAlign,
|
|
73977
|
-
nodeGap: this._spec.nodeGap,
|
|
73978
|
-
nodeWidth: this._spec.nodeWidth,
|
|
74096
|
+
nodeAlign: this._spec.nodeAlign ?? 'justify',
|
|
74097
|
+
nodeGap: this._spec.nodeGap ?? 8,
|
|
74098
|
+
nodeWidth: this._spec.nodeWidth ?? 10,
|
|
73979
74099
|
linkWidth: this._spec.linkWidth,
|
|
73980
74100
|
minStepWidth: this._spec.minStepWidth,
|
|
73981
|
-
minNodeHeight: this._spec.minNodeHeight,
|
|
74101
|
+
minNodeHeight: this._spec.minNodeHeight ?? 4,
|
|
73982
74102
|
minLinkHeight: this._spec.minLinkHeight,
|
|
73983
74103
|
iterations: this._spec.iterations,
|
|
73984
74104
|
nodeKey: this._spec.nodeKey,
|
|
@@ -77149,6 +77269,7 @@
|
|
|
77149
77269
|
_getDefaultSeriesSpec(spec) {
|
|
77150
77270
|
return {
|
|
77151
77271
|
...super._getDefaultSeriesSpec(spec),
|
|
77272
|
+
bar: spec.bar,
|
|
77152
77273
|
stackLabel: spec.stackLabel,
|
|
77153
77274
|
leaderLine: spec.leaderLine,
|
|
77154
77275
|
total: spec.total
|
|
@@ -77896,9 +78017,6 @@
|
|
|
77896
78017
|
return allDomain.slice(Math.min(startIndex, endIndex), Math.max(startIndex, endIndex) + 1);
|
|
77897
78018
|
}
|
|
77898
78019
|
_handleStateChange = (startValue, endValue) => {
|
|
77899
|
-
if (startValue === this._startValue && endValue === this._endValue) {
|
|
77900
|
-
return false;
|
|
77901
|
-
}
|
|
77902
78020
|
this._startValue = startValue;
|
|
77903
78021
|
this._endValue = endValue;
|
|
77904
78022
|
this._newDomain = this._parseDomainFromState(this._startValue, this._endValue);
|
|
@@ -78145,12 +78263,12 @@
|
|
|
78145
78263
|
this._middleHandlerSize = this._computeMiddleHandlerSize();
|
|
78146
78264
|
this._width = this._computeWidth();
|
|
78147
78265
|
this._height = this._computeHeight();
|
|
78148
|
-
if (this._originalSpec
|
|
78266
|
+
if (isNil(this._originalSpec?.startHandler?.style?.size)) {
|
|
78149
78267
|
this._spec.startHandler.style.size = this._isHorizontal
|
|
78150
78268
|
? this._height - this._middleHandlerSize
|
|
78151
78269
|
: this._width - this._middleHandlerSize;
|
|
78152
78270
|
}
|
|
78153
|
-
if (this._originalSpec
|
|
78271
|
+
if (isNil(this._originalSpec?.startHandler?.style?.size)) {
|
|
78154
78272
|
this._spec.endHandler.style.size = this._isHorizontal
|
|
78155
78273
|
? this._height - this._middleHandlerSize
|
|
78156
78274
|
: this._width - this._middleHandlerSize;
|
|
@@ -78233,7 +78351,8 @@
|
|
|
78233
78351
|
const offsetLeft = this._orient === 'left' ? this._middleHandlerSize : 0;
|
|
78234
78352
|
const offsetHandler = this._isHorizontal ? this._startHandlerSize / 2 : 0;
|
|
78235
78353
|
const xScale = this._isHorizontal ? this._stateScale : this._valueScale;
|
|
78236
|
-
|
|
78354
|
+
const xField = this._isHorizontal ? this._stateField : this._valueField;
|
|
78355
|
+
return xScale.scale(datum[xField]) + this.getLayoutStartPoint().x + offsetLeft + offsetHandler;
|
|
78237
78356
|
};
|
|
78238
78357
|
_dataToPositionX2 = (datum) => {
|
|
78239
78358
|
const offsetLeft = this._orient === 'left' ? this._middleHandlerSize : 0;
|
|
@@ -78246,7 +78365,8 @@
|
|
|
78246
78365
|
const offsetTop = this._isHorizontal ? this._middleHandlerSize : 0;
|
|
78247
78366
|
const offsetHandler = this._isHorizontal ? 0 : this._startHandlerSize / 2;
|
|
78248
78367
|
const yScale = this._isHorizontal ? this._valueScale : this._stateScale;
|
|
78249
|
-
|
|
78368
|
+
const yField = this._isHorizontal ? this._valueField : this._stateField;
|
|
78369
|
+
return yScale.scale(datum[yField]) + this.getLayoutStartPoint().y + offsetTop + offsetHandler;
|
|
78250
78370
|
};
|
|
78251
78371
|
_dataToPositionY2 = (datum) => {
|
|
78252
78372
|
const offsetTop = this._isHorizontal ? this._middleHandlerSize : 0;
|
|
@@ -82008,7 +82128,7 @@
|
|
|
82008
82128
|
selectedData.forEach(s => {
|
|
82009
82129
|
selectedFilter[s] = true;
|
|
82010
82130
|
});
|
|
82011
|
-
const datumField = field();
|
|
82131
|
+
const datumField = field() ?? DEFAULT_DATA_SERIES_FIELD;
|
|
82012
82132
|
if (isValid(datumField)) {
|
|
82013
82133
|
data = data.filter(d => selectedFilter[d[datumField]] === true);
|
|
82014
82134
|
}
|