@visactor/vchart 1.2.0-beta.1 → 1.2.0-beta.2
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 +281 -113
- package/build/index.min.js +1 -1
- package/cjs/chart/area/area.js +3 -1
- package/cjs/chart/area/area.js.map +1 -1
- package/cjs/chart/base-chart.d.ts +6 -2
- package/cjs/chart/base-chart.js +34 -11
- package/cjs/chart/base-chart.js.map +1 -1
- package/cjs/chart/line/line.js +3 -1
- package/cjs/chart/line/line.js.map +1 -1
- package/cjs/chart/radar/radar.js +3 -1
- package/cjs/chart/radar/radar.js.map +1 -1
- package/cjs/chart/stack.js +3 -3
- package/cjs/chart/stack.js.map +1 -1
- package/cjs/component/axis/mixin/linear-axis-mixin.js +4 -1
- package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
- package/cjs/component/geo/geo-coordinate.d.ts +4 -0
- package/cjs/component/geo/geo-coordinate.js +18 -2
- package/cjs/component/geo/geo-coordinate.js.map +1 -1
- package/cjs/component/indicator/indicator.js +1 -1
- package/cjs/component/indicator/indicator.js.map +1 -1
- package/cjs/component/tooltip/processor/dimension-tooltip.js +3 -2
- package/cjs/component/tooltip/processor/dimension-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/core/vchart.js +10 -8
- package/cjs/core/vchart.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/event/events/dimension/base.js +1 -1
- package/cjs/event/events/dimension/base.js.map +1 -1
- package/cjs/event/events/dimension/interface.js.map +1 -1
- package/cjs/event/events/dimension/util/cartesian.d.ts +2 -2
- package/cjs/event/events/dimension/util/cartesian.js +12 -11
- package/cjs/event/events/dimension/util/cartesian.js.map +1 -1
- package/cjs/event/events/dimension/util/common.d.ts +1 -1
- package/cjs/event/events/dimension/util/common.js +13 -6
- package/cjs/event/events/dimension/util/common.js.map +1 -1
- package/cjs/model/interface.d.ts +0 -4
- package/cjs/model/interface.js.map +1 -1
- package/cjs/model/layout-item.d.ts +0 -3
- package/cjs/model/layout-item.js +1 -8
- package/cjs/model/layout-item.js.map +1 -1
- package/cjs/series/area/area.js +5 -4
- package/cjs/series/area/area.js.map +1 -1
- package/cjs/series/area/interface.d.ts +1 -0
- package/cjs/series/area/interface.js.map +1 -1
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/line/interface.d.ts +4 -2
- package/cjs/series/line/interface.js.map +1 -1
- package/cjs/series/line/line.js +5 -3
- package/cjs/series/line/line.js.map +1 -1
- package/cjs/series/mixin/line-mixin.d.ts +1 -1
- package/cjs/series/mixin/line-mixin.js +3 -2
- package/cjs/series/mixin/line-mixin.js.map +1 -1
- package/cjs/series/pie/pie.js +1 -1
- package/cjs/series/pie/pie.js.map +1 -1
- package/cjs/series/radar/interface.d.ts +1 -0
- package/cjs/series/radar/interface.js.map +1 -1
- package/cjs/series/radar/radar.js +4 -4
- package/cjs/series/radar/radar.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/cjs/theme/buildin-theme/light/series/area.js +5 -0
- package/cjs/theme/buildin-theme/light/series/area.js.map +1 -1
- package/cjs/theme/buildin-theme/light/series/line.js +5 -0
- package/cjs/theme/buildin-theme/light/series/line.js.map +1 -1
- package/cjs/theme/buildin-theme/light/series/radar.js +5 -0
- package/cjs/theme/buildin-theme/light/series/radar.js.map +1 -1
- package/cjs/typings/spec/common.d.ts +7 -2
- package/cjs/typings/spec/common.js.map +1 -1
- package/cjs/typings/visual.d.ts +1 -1
- package/cjs/typings/visual.js.map +1 -1
- package/cjs/util/spec.d.ts +4 -0
- package/cjs/util/spec.js +24 -2
- package/cjs/util/spec.js.map +1 -1
- package/esm/chart/area/area.js +3 -1
- package/esm/chart/area/area.js.map +1 -1
- package/esm/chart/base-chart.d.ts +6 -2
- package/esm/chart/base-chart.js +34 -9
- package/esm/chart/base-chart.js.map +1 -1
- package/esm/chart/line/line.js +3 -1
- package/esm/chart/line/line.js.map +1 -1
- package/esm/chart/radar/radar.js +3 -1
- package/esm/chart/radar/radar.js.map +1 -1
- package/esm/chart/stack.js +3 -3
- package/esm/chart/stack.js.map +1 -1
- package/esm/component/axis/mixin/linear-axis-mixin.js +4 -1
- package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
- package/esm/component/geo/geo-coordinate.d.ts +4 -0
- package/esm/component/geo/geo-coordinate.js +18 -2
- package/esm/component/geo/geo-coordinate.js.map +1 -1
- package/esm/component/indicator/indicator.js +1 -1
- package/esm/component/indicator/indicator.js.map +1 -1
- package/esm/component/tooltip/processor/dimension-tooltip.js +4 -1
- package/esm/component/tooltip/processor/dimension-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/core/vchart.js +11 -9
- package/esm/core/vchart.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/event/events/dimension/base.js +2 -2
- package/esm/event/events/dimension/base.js.map +1 -1
- package/esm/event/events/dimension/interface.js.map +1 -1
- package/esm/event/events/dimension/util/cartesian.d.ts +2 -2
- package/esm/event/events/dimension/util/cartesian.js +7 -8
- package/esm/event/events/dimension/util/cartesian.js.map +1 -1
- package/esm/event/events/dimension/util/common.d.ts +1 -1
- package/esm/event/events/dimension/util/common.js +14 -6
- package/esm/event/events/dimension/util/common.js.map +1 -1
- package/esm/model/interface.d.ts +0 -4
- package/esm/model/interface.js.map +1 -1
- package/esm/model/layout-item.d.ts +0 -3
- package/esm/model/layout-item.js +1 -8
- package/esm/model/layout-item.js.map +1 -1
- package/esm/series/area/area.js +5 -4
- package/esm/series/area/area.js.map +1 -1
- package/esm/series/area/interface.d.ts +1 -0
- package/esm/series/area/interface.js.map +1 -1
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/line/interface.d.ts +4 -2
- package/esm/series/line/interface.js.map +1 -1
- package/esm/series/line/line.js +5 -3
- package/esm/series/line/line.js.map +1 -1
- package/esm/series/mixin/line-mixin.d.ts +1 -1
- package/esm/series/mixin/line-mixin.js +3 -2
- package/esm/series/mixin/line-mixin.js.map +1 -1
- package/esm/series/pie/pie.js +2 -2
- package/esm/series/pie/pie.js.map +1 -1
- package/esm/series/radar/interface.d.ts +1 -0
- package/esm/series/radar/interface.js.map +1 -1
- package/esm/series/radar/radar.js +4 -4
- package/esm/series/radar/radar.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/esm/theme/buildin-theme/light/series/area.js +5 -0
- package/esm/theme/buildin-theme/light/series/area.js.map +1 -1
- package/esm/theme/buildin-theme/light/series/line.js +5 -0
- package/esm/theme/buildin-theme/light/series/line.js.map +1 -1
- package/esm/theme/buildin-theme/light/series/radar.js +5 -0
- package/esm/theme/buildin-theme/light/series/radar.js.map +1 -1
- package/esm/typings/spec/common.d.ts +7 -2
- package/esm/typings/spec/common.js.map +1 -1
- package/esm/typings/visual.d.ts +1 -1
- package/esm/typings/visual.js.map +1 -1
- package/esm/util/spec.d.ts +4 -0
- package/esm/util/spec.js +21 -0
- package/esm/util/spec.js.map +1 -1
- package/package.json +2 -2
package/build/index.js
CHANGED
|
@@ -9735,6 +9735,23 @@
|
|
|
9735
9735
|
const keys = Object.keys(obj);
|
|
9736
9736
|
return obj instanceof DataView || dataViewKeys.every(key => keys.includes(key));
|
|
9737
9737
|
}
|
|
9738
|
+
function convertBackgroundSpec(bg) {
|
|
9739
|
+
if (!bg) {
|
|
9740
|
+
return null;
|
|
9741
|
+
}
|
|
9742
|
+
if (typeof bg === 'string') {
|
|
9743
|
+
return {
|
|
9744
|
+
fill: bg,
|
|
9745
|
+
fillOpacity: 1
|
|
9746
|
+
};
|
|
9747
|
+
}
|
|
9748
|
+
if (typeof bg !== 'object') {
|
|
9749
|
+
return null;
|
|
9750
|
+
}
|
|
9751
|
+
const { x, y, width, height, x1, y1, image, ...rest } = bg;
|
|
9752
|
+
rest.background = image;
|
|
9753
|
+
return rest;
|
|
9754
|
+
}
|
|
9738
9755
|
|
|
9739
9756
|
var check = function (it) {
|
|
9740
9757
|
return it && it.Math == Math && it;
|
|
@@ -22303,18 +22320,18 @@
|
|
|
22303
22320
|
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);
|
|
22304
22321
|
});
|
|
22305
22322
|
|
|
22306
|
-
function runFill(fill) {
|
|
22307
|
-
return
|
|
22323
|
+
function runFill(fill, background) {
|
|
22324
|
+
return !(!fill && !background);
|
|
22308
22325
|
}
|
|
22309
22326
|
function runStroke(stroke, lineWidth) {
|
|
22310
22327
|
let s;
|
|
22311
22328
|
return s = isArray$3(stroke) ? stroke.some(item => item || void 0 === item) : !!stroke, s && lineWidth > 0;
|
|
22312
22329
|
}
|
|
22313
|
-
function fillVisible(opacity, fillOpacity) {
|
|
22314
|
-
return opacity * fillOpacity > 0;
|
|
22330
|
+
function fillVisible(opacity, fillOpacity, fill) {
|
|
22331
|
+
return fill && opacity * fillOpacity > 0;
|
|
22315
22332
|
}
|
|
22316
|
-
function rectFillVisible(opacity, fillOpacity, width, height) {
|
|
22317
|
-
return opacity * fillOpacity > 0 && width > 0 && height > 0;
|
|
22333
|
+
function rectFillVisible(opacity, fillOpacity, width, height, fill) {
|
|
22334
|
+
return fill && opacity * fillOpacity > 0 && width > 0 && height > 0;
|
|
22318
22335
|
}
|
|
22319
22336
|
function strokeVisible(opacity, strokeOpacity) {
|
|
22320
22337
|
return opacity * strokeOpacity > 0;
|
|
@@ -22334,7 +22351,7 @@
|
|
|
22334
22351
|
strokeOpacity = themeAttributes.strokeOpacity,
|
|
22335
22352
|
visible = themeAttributes.visible
|
|
22336
22353
|
} = graphic.attribute,
|
|
22337
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
22354
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
22338
22355
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
22339
22356
|
doFill = runFill(fill),
|
|
22340
22357
|
doStroke = runStroke(stroke, lineWidth);
|
|
@@ -22696,12 +22713,12 @@
|
|
|
22696
22713
|
x: originX = arcAttribute.x,
|
|
22697
22714
|
y: originY = arcAttribute.y
|
|
22698
22715
|
} = arc.attribute,
|
|
22699
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
22716
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
22700
22717
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
22701
|
-
doFill = runFill(fill),
|
|
22718
|
+
doFill = runFill(fill, background),
|
|
22702
22719
|
doStroke = runStroke(stroke, lineWidth);
|
|
22703
22720
|
if (!arc.valid || !visible) return;
|
|
22704
|
-
if (!
|
|
22721
|
+
if (!doFill && !doStroke) return;
|
|
22705
22722
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
|
|
22706
22723
|
const {
|
|
22707
22724
|
outerRadius = arcAttribute.outerRadius,
|
|
@@ -22714,7 +22731,7 @@
|
|
|
22714
22731
|
isFullStroke: isFullStroke,
|
|
22715
22732
|
stroke: arrayStroke
|
|
22716
22733
|
} = parseStroke(stroke);
|
|
22717
|
-
if (doFill || isFullStroke
|
|
22734
|
+
if (doFill || isFullStroke) {
|
|
22718
22735
|
if (context.beginPath(), drawArcPath$1(arc, context, x, y, outerRadius, innerRadius), !this._arcBeforeRenderContribitions) {
|
|
22719
22736
|
this._arcBeforeRenderContribitions = [], this._arcAfterRenderContribitions = [];
|
|
22720
22737
|
const contributions = this.arcRenderContribitions.getContributions() || [];
|
|
@@ -22838,11 +22855,11 @@
|
|
|
22838
22855
|
x: originX = circleAttribute.x,
|
|
22839
22856
|
y: originY = circleAttribute.y
|
|
22840
22857
|
} = circle.attribute,
|
|
22841
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
22858
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
22842
22859
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
22843
|
-
doFill = runFill(fill),
|
|
22860
|
+
doFill = runFill(fill, background),
|
|
22844
22861
|
doStroke = runStroke(stroke, lineWidth);
|
|
22845
|
-
circle.valid && visible && (doFill || doStroke
|
|
22862
|
+
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 => {
|
|
22846
22863
|
c.time === BaseRenderContributionTime.beforeFillStroke && c.drawShape(circle, context, x, y, doFill, doStroke, fVisible, sVisible, circleAttribute, drawContext, fillCb, strokeCb);
|
|
22847
22864
|
}), 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 => {
|
|
22848
22865
|
c.time === BaseRenderContributionTime.afterFillStroke && c.drawShape(circle, context, x, y, doFill, doStroke, fVisible, sVisible, circleAttribute, drawContext, fillCb, strokeCb);
|
|
@@ -25807,10 +25824,14 @@
|
|
|
25807
25824
|
return aabbBounds.set(-outerRadius, -outerRadius, outerRadius, outerRadius), aabbBounds;
|
|
25808
25825
|
}
|
|
25809
25826
|
updateArcAABBBoundsAccurate(attribute, arcTheme, aabbBounds, graphic) {
|
|
25810
|
-
|
|
25827
|
+
let {
|
|
25811
25828
|
outerRadius = arcTheme.outerRadius,
|
|
25812
25829
|
innerRadius = arcTheme.innerRadius
|
|
25813
25830
|
} = attribute;
|
|
25831
|
+
if (outerRadius < innerRadius) {
|
|
25832
|
+
const temp = outerRadius;
|
|
25833
|
+
outerRadius = innerRadius, innerRadius = temp;
|
|
25834
|
+
}
|
|
25814
25835
|
let {
|
|
25815
25836
|
endAngle = arcTheme.endAngle,
|
|
25816
25837
|
startAngle = arcTheme.startAngle
|
|
@@ -25933,7 +25954,7 @@
|
|
|
25933
25954
|
return isArray$3(text) ? !text.every(t => null == t || "" === t) : null != text && "" !== text;
|
|
25934
25955
|
}
|
|
25935
25956
|
updateMultilineAABBBounds(text) {
|
|
25936
|
-
var _a;
|
|
25957
|
+
var _a, _b, _c;
|
|
25937
25958
|
const textTheme = getTheme(this).text,
|
|
25938
25959
|
{
|
|
25939
25960
|
fontFamily = textTheme.fontFamily,
|
|
@@ -25972,6 +25993,10 @@
|
|
|
25972
25993
|
break;
|
|
25973
25994
|
}
|
|
25974
25995
|
const clip = layoutObj.textMeasure.clipText(str, layoutObj.textOptions, maxLineWidth);
|
|
25996
|
+
if ("" !== str && "" === clip.str) if (ellipsis) {
|
|
25997
|
+
const clipEllipsis = layoutObj.textMeasure.clipTextWithSuffix(str, layoutObj.textOptions, maxLineWidth, ellipsis);
|
|
25998
|
+
clip.str = null !== (_b = clipEllipsis.str) && void 0 !== _b ? _b : "", clip.width = null !== (_c = clipEllipsis.width) && void 0 !== _c ? _c : 0;
|
|
25999
|
+
} else clip.str = "", clip.width = 0;
|
|
25975
26000
|
if (linesLayout.push({
|
|
25976
26001
|
str: clip.str,
|
|
25977
26002
|
width: clip.width
|
|
@@ -26197,6 +26222,7 @@
|
|
|
26197
26222
|
BaseRender = __decorate$1v([injectable()], BaseRender);
|
|
26198
26223
|
|
|
26199
26224
|
function drawSegments(path, segPath, percent, clipRangeByDimension, params) {
|
|
26225
|
+
if (!segPath) return;
|
|
26200
26226
|
const {
|
|
26201
26227
|
offsetX = 0,
|
|
26202
26228
|
offsetY = 0,
|
|
@@ -26299,6 +26325,7 @@
|
|
|
26299
26325
|
}
|
|
26300
26326
|
drawSegmentItem(context, cache, fill, stroke, fillOpacity, strokeOpacity, attribute, defaultAttribute, clipRange, clipRangeByDimension, offsetX, offsetY, line, fillCb, strokeCb) {
|
|
26301
26327
|
var _a;
|
|
26328
|
+
if (!cache) return;
|
|
26302
26329
|
context.beginPath();
|
|
26303
26330
|
const z = null !== (_a = this.z) && void 0 !== _a ? _a : 0;
|
|
26304
26331
|
drawSegments(context.camera ? context : context.nativeContext, cache, clipRange, clipRangeByDimension, {
|
|
@@ -26323,7 +26350,7 @@
|
|
|
26323
26350
|
lineWidth = lineAttribute.lineWidth,
|
|
26324
26351
|
visible = lineAttribute.visible
|
|
26325
26352
|
} = line.attribute,
|
|
26326
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
26353
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
26327
26354
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
26328
26355
|
doFill = runFill(fill),
|
|
26329
26356
|
doStroke = runStroke(stroke, lineWidth);
|
|
@@ -26504,12 +26531,13 @@
|
|
|
26504
26531
|
opacity = areaAttribute.opacity,
|
|
26505
26532
|
visible = areaAttribute.visible,
|
|
26506
26533
|
z = areaAttribute.z,
|
|
26534
|
+
background: background,
|
|
26507
26535
|
stroke = area.attribute.stroke,
|
|
26508
26536
|
lineWidth = areaAttribute.lineWidth,
|
|
26509
26537
|
strokeOpacity = areaAttribute.strokeOpacity
|
|
26510
26538
|
} = area.attribute,
|
|
26511
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
26512
|
-
doFill = runFill(fill),
|
|
26539
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
26540
|
+
doFill = runFill(fill, background),
|
|
26513
26541
|
doStroke = runStroke(stroke, lineWidth),
|
|
26514
26542
|
sVisible = strokeVisible(opacity, strokeOpacity);
|
|
26515
26543
|
if (!area.valid || !visible) return;
|
|
@@ -26610,6 +26638,7 @@
|
|
|
26610
26638
|
drawPathProxy(area, context, x, y, drawContext, params) || this.drawShape(area, context, x, y, drawContext, params), context.highPerformanceRestore();
|
|
26611
26639
|
}
|
|
26612
26640
|
drawSegmentItem(context, cache, fill, fillOpacity, stroke, strokeOpacity, attribute, defaultAttribute, clipRange, offsetX, offsetY, offsetZ, area, drawContext, fillCb, strokeCb) {
|
|
26641
|
+
if (!cache) return;
|
|
26613
26642
|
context.beginPath();
|
|
26614
26643
|
drawAreaSegments(context.camera ? context : context.nativeContext, cache, clipRange, {
|
|
26615
26644
|
offsetX: offsetX,
|
|
@@ -26678,11 +26707,11 @@
|
|
|
26678
26707
|
y: originY = pathAttribute.y
|
|
26679
26708
|
} = path.attribute,
|
|
26680
26709
|
z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
|
|
26681
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
26710
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
26682
26711
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
26683
|
-
doFill = runFill(fill),
|
|
26712
|
+
doFill = runFill(fill, background),
|
|
26684
26713
|
doStroke = runStroke(stroke, lineWidth);
|
|
26685
|
-
if (path.valid && visible && (doFill || doStroke
|
|
26714
|
+
if (path.valid && visible && (doFill || doStroke) && (fVisible || sVisible || fillCb || strokeCb || background)) {
|
|
26686
26715
|
if (context.beginPath(), path.pathShape) renderCommandList(path.pathShape.commandList, context, x, y, 1, 1, z);else {
|
|
26687
26716
|
const path2D = null !== (_b = path.attribute.path) && void 0 !== _b ? _b : pathAttribute.path;
|
|
26688
26717
|
renderCommandList(path2D.commandList, context, x, y, 1, 1, z);
|
|
@@ -26804,12 +26833,12 @@
|
|
|
26804
26833
|
x: originX = rectAttribute.x,
|
|
26805
26834
|
y: originY = rectAttribute.y
|
|
26806
26835
|
} = rect.attribute,
|
|
26807
|
-
fVisible = rectFillVisible(opacity, fillOpacity, width, height),
|
|
26836
|
+
fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
|
|
26808
26837
|
sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
|
|
26809
|
-
doFill = runFill(fill),
|
|
26838
|
+
doFill = runFill(fill, background),
|
|
26810
26839
|
doStroke = runStroke(stroke, lineWidth);
|
|
26811
26840
|
if (!rect.valid || !visible) return;
|
|
26812
|
-
if (!
|
|
26841
|
+
if (!doFill && !doStroke) return;
|
|
26813
26842
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
|
|
26814
26843
|
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));
|
|
26815
26844
|
const doFillOrStroke = {
|
|
@@ -26879,12 +26908,12 @@
|
|
|
26879
26908
|
scaleX = symbolAttribute.scaleX,
|
|
26880
26909
|
scaleY = symbolAttribute.scaleY
|
|
26881
26910
|
} = symbol.attribute,
|
|
26882
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
26911
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
26883
26912
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
26884
|
-
doFill = runFill(fill),
|
|
26913
|
+
doFill = runFill(fill, background),
|
|
26885
26914
|
doStroke = runStroke(stroke, lineWidth);
|
|
26886
26915
|
if (!symbol.valid || !visible) return;
|
|
26887
|
-
if (!
|
|
26916
|
+
if (!doFill && !doStroke) return;
|
|
26888
26917
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
|
|
26889
26918
|
const parsedPath = symbol.getParsedPath();
|
|
26890
26919
|
if (!parsedPath) return;
|
|
@@ -26962,7 +26991,7 @@
|
|
|
26962
26991
|
y: originY = textAttribute.y
|
|
26963
26992
|
} = text.attribute,
|
|
26964
26993
|
lineHeight = null !== (_a = text.attribute.lineHeight) && void 0 !== _a ? _a : fontSize,
|
|
26965
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
26994
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
26966
26995
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
26967
26996
|
doFill = runFill(fill),
|
|
26968
26997
|
doStroke = runStroke(stroke, lineWidth);
|
|
@@ -27175,11 +27204,11 @@
|
|
|
27175
27204
|
x: originX = polygonAttribute.x,
|
|
27176
27205
|
y: originY = polygonAttribute.y
|
|
27177
27206
|
} = polygon.attribute,
|
|
27178
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
27207
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
27179
27208
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
27180
|
-
doFill = runFill(fill),
|
|
27209
|
+
doFill = runFill(fill, background),
|
|
27181
27210
|
doStroke = runStroke(stroke, lineWidth);
|
|
27182
|
-
polygon.valid && visible && (doFill || doStroke
|
|
27211
|
+
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 => {
|
|
27183
27212
|
c.time === BaseRenderContributionTime.beforeFillStroke && c.drawShape(polygon, context, x, y, doFill, doStroke, fVisible, sVisible, polygonAttribute, drawContext, fillCb, strokeCb);
|
|
27184
27213
|
}), 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 => {
|
|
27185
27214
|
c.time === BaseRenderContributionTime.afterFillStroke && c.drawShape(polygon, context, x, y, doFill, doStroke, fVisible, sVisible, polygonAttribute, drawContext, fillCb, strokeCb);
|
|
@@ -27238,7 +27267,7 @@
|
|
|
27238
27267
|
repeatY = imageAttribute.repeatY,
|
|
27239
27268
|
image: url
|
|
27240
27269
|
} = image.attribute,
|
|
27241
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
27270
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
27242
27271
|
doFill = runFill(fill);
|
|
27243
27272
|
if (image.valid && visible && doFill && (fVisible || fillCb)) {
|
|
27244
27273
|
if (this._imageRenderContribitions || (this._imageRenderContribitions = this.imageRenderContribitions.getContributions() || []), this._imageRenderContribitions.forEach(c => {
|
|
@@ -32357,13 +32386,13 @@
|
|
|
32357
32386
|
lineWidth = groupAttribute.lineWidth,
|
|
32358
32387
|
visible = groupAttribute.visible
|
|
32359
32388
|
} = group.attribute,
|
|
32360
|
-
fVisible = rectFillVisible(opacity, fillOpacity, width, height),
|
|
32389
|
+
fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
|
|
32361
32390
|
sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
|
|
32362
|
-
doFill = runFill(fill),
|
|
32391
|
+
doFill = runFill(fill, background),
|
|
32363
32392
|
doStroke = runStroke(stroke, lineWidth);
|
|
32364
32393
|
if (!group.valid || !visible) return;
|
|
32365
32394
|
if (!clip) {
|
|
32366
|
-
if (!
|
|
32395
|
+
if (!doFill && !doStroke) return;
|
|
32367
32396
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
|
|
32368
32397
|
}
|
|
32369
32398
|
if (path && path.length && drawContext.drawContribution) {
|
|
@@ -32445,7 +32474,7 @@
|
|
|
32445
32474
|
lineWidth = lineAttribute.lineWidth,
|
|
32446
32475
|
visible = lineAttribute.visible
|
|
32447
32476
|
} = line.attribute,
|
|
32448
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
32477
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
32449
32478
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
32450
32479
|
doFill = runFill(fill),
|
|
32451
32480
|
doStroke = runStroke(stroke, lineWidth);
|
|
@@ -32495,7 +32524,7 @@
|
|
|
32495
32524
|
opacity = areaAttribute.opacity,
|
|
32496
32525
|
visible = areaAttribute.visible
|
|
32497
32526
|
} = area.attribute,
|
|
32498
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
32527
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
32499
32528
|
doFill = runFill(fill);
|
|
32500
32529
|
if (!area.valid || !visible) return;
|
|
32501
32530
|
if (!doFill) return;
|
|
@@ -32685,7 +32714,7 @@
|
|
|
32685
32714
|
visible = rectAttribute.visible
|
|
32686
32715
|
} = rect.attribute,
|
|
32687
32716
|
z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
|
|
32688
|
-
fVisible = rectFillVisible(opacity, fillOpacity, width, height),
|
|
32717
|
+
fVisible = rectFillVisible(opacity, fillOpacity, width, height, fill),
|
|
32689
32718
|
sVisible = rectStrokeVisible(opacity, strokeOpacity, width, height),
|
|
32690
32719
|
doFill = runFill(fill),
|
|
32691
32720
|
doStroke = runStroke(stroke, lineWidth);
|
|
@@ -32813,7 +32842,7 @@
|
|
|
32813
32842
|
visible = richtextAttribute.visible
|
|
32814
32843
|
} = richtext.attribute;
|
|
32815
32844
|
if (!richtext.valid || !visible) return;
|
|
32816
|
-
if (!fillVisible(opacity, fillOpacity)) return;
|
|
32845
|
+
if (!fillVisible(opacity, fillOpacity, !0)) return;
|
|
32817
32846
|
context.translate(x, y);
|
|
32818
32847
|
richtext.getFrameCache().draw(context, this.drawIcon);
|
|
32819
32848
|
}
|
|
@@ -32973,13 +33002,13 @@
|
|
|
32973
33002
|
strokeOpacity = arcAttribute.strokeOpacity,
|
|
32974
33003
|
visible = arcAttribute.visible
|
|
32975
33004
|
} = arc.attribute,
|
|
32976
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
33005
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
32977
33006
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
32978
|
-
doFill = runFill(fill),
|
|
33007
|
+
doFill = runFill(fill, background),
|
|
32979
33008
|
doStroke = runStroke(stroke, lineWidth),
|
|
32980
33009
|
z = null !== (_a = this.z) && void 0 !== _a ? _a : 0;
|
|
32981
33010
|
if (!arc.valid || !visible) return;
|
|
32982
|
-
if (!
|
|
33011
|
+
if (!doFill && !doStroke) return;
|
|
32983
33012
|
if (!(fVisible || sVisible || fillCb || strokeCb || background)) return;
|
|
32984
33013
|
const {
|
|
32985
33014
|
outerRadius = arcAttribute.outerRadius,
|
|
@@ -33066,7 +33095,7 @@
|
|
|
33066
33095
|
face = [!0, !0, !0, !0, !0, !0]
|
|
33067
33096
|
} = pyramid3d.attribute,
|
|
33068
33097
|
z = null !== (_a = this.z) && void 0 !== _a ? _a : 0,
|
|
33069
|
-
fVisible = fillVisible(opacity, fillOpacity),
|
|
33098
|
+
fVisible = fillVisible(opacity, fillOpacity, fill),
|
|
33070
33099
|
sVisible = strokeVisible(opacity, strokeOpacity),
|
|
33071
33100
|
doFill = runFill(fill),
|
|
33072
33101
|
doStroke = runStroke(stroke, lineWidth);
|
|
@@ -35072,6 +35101,11 @@
|
|
|
35072
35101
|
lineWidth: 2,
|
|
35073
35102
|
fontSize: THEME_CONSTANTS.LABEL_FONT_SIZE
|
|
35074
35103
|
}
|
|
35104
|
+
},
|
|
35105
|
+
point: {
|
|
35106
|
+
style: {
|
|
35107
|
+
symbolType: 'circle'
|
|
35108
|
+
}
|
|
35075
35109
|
}
|
|
35076
35110
|
};
|
|
35077
35111
|
|
|
@@ -35267,6 +35301,11 @@
|
|
|
35267
35301
|
stroke: 'white',
|
|
35268
35302
|
fontSize: THEME_CONSTANTS.LABEL_FONT_SIZE
|
|
35269
35303
|
}
|
|
35304
|
+
},
|
|
35305
|
+
point: {
|
|
35306
|
+
style: {
|
|
35307
|
+
symbolType: 'circle'
|
|
35308
|
+
}
|
|
35270
35309
|
}
|
|
35271
35310
|
};
|
|
35272
35311
|
|
|
@@ -35358,6 +35397,11 @@
|
|
|
35358
35397
|
stroke: 'white',
|
|
35359
35398
|
fontSize: THEME_CONSTANTS.LABEL_FONT_SIZE
|
|
35360
35399
|
}
|
|
35400
|
+
},
|
|
35401
|
+
point: {
|
|
35402
|
+
style: {
|
|
35403
|
+
symbolType: 'circle'
|
|
35404
|
+
}
|
|
35361
35405
|
}
|
|
35362
35406
|
};
|
|
35363
35407
|
|
|
@@ -40531,7 +40575,8 @@
|
|
|
40531
40575
|
maxWidth: maxWidth,
|
|
40532
40576
|
padding = 4,
|
|
40533
40577
|
visible: visible,
|
|
40534
|
-
state: state
|
|
40578
|
+
state: state,
|
|
40579
|
+
formatMethod: formatMethod
|
|
40535
40580
|
} = this.attribute,
|
|
40536
40581
|
parsedPadding = normalizePadding$1(padding),
|
|
40537
40582
|
group = this.createOrUpdateChild("tag-content", {
|
|
@@ -40563,7 +40608,7 @@
|
|
|
40563
40608
|
}
|
|
40564
40609
|
tagWidth += symbolPlaceWidth, textX += symbolPlaceWidth;
|
|
40565
40610
|
const textAttrs = Object.assign(Object.assign({
|
|
40566
|
-
text: text,
|
|
40611
|
+
text: formatMethod ? formatMethod(text) : text,
|
|
40567
40612
|
visible: isValid(text) && !1 !== visible,
|
|
40568
40613
|
lineHeight: null == textStyle ? void 0 : textStyle.fontSize
|
|
40569
40614
|
}, textStyle), {
|
|
@@ -43511,13 +43556,14 @@
|
|
|
43511
43556
|
previewCallbackX: previewCallbackX,
|
|
43512
43557
|
previewCallbackY: previewCallbackY,
|
|
43513
43558
|
previewCallbackX1: previewCallbackX1,
|
|
43514
|
-
previewCallbackY1: previewCallbackY1
|
|
43559
|
+
previewCallbackY1: previewCallbackY1,
|
|
43560
|
+
updateStateCallback: updateStateCallback
|
|
43515
43561
|
} = this.attribute,
|
|
43516
43562
|
{
|
|
43517
43563
|
width: width,
|
|
43518
43564
|
height: height
|
|
43519
43565
|
} = size;
|
|
43520
|
-
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);
|
|
43566
|
+
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);
|
|
43521
43567
|
}
|
|
43522
43568
|
bindEvents() {
|
|
43523
43569
|
const {
|
|
@@ -43947,10 +43993,10 @@
|
|
|
43947
43993
|
start: startAttr,
|
|
43948
43994
|
end: endAttr
|
|
43949
43995
|
} = this.attribute;
|
|
43950
|
-
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({
|
|
43996
|
+
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({
|
|
43951
43997
|
start: start,
|
|
43952
43998
|
end: end
|
|
43953
|
-
}));
|
|
43999
|
+
}), this._updateStateCallback && this._updateStateCallback(start, end)));
|
|
43954
44000
|
}
|
|
43955
44001
|
setPreviewData(data) {
|
|
43956
44002
|
this._previewData = data;
|
|
@@ -44991,7 +45037,7 @@
|
|
|
44991
45037
|
const innerGroupBounds = innerGroup.AABBBounds,
|
|
44992
45038
|
innerGroupWidth = innerGroupBounds.width(),
|
|
44993
45039
|
innerGroupHeight = innerGroupBounds.height(),
|
|
44994
|
-
itemGroupWidth = this.
|
|
45040
|
+
itemGroupWidth = isValid(this.attribute.item.width) ? this.attribute.item.width : innerGroupWidth + parsedPadding[1] + parsedPadding[3],
|
|
44995
45041
|
itemGroupHeight = this._itemHeightByUser || innerGroupHeight + parsedPadding[0] + parsedPadding[2];
|
|
44996
45042
|
return itemGroup.attribute.width = itemGroupWidth, itemGroup.attribute.height = itemGroupHeight, innerGroup.translateTo(-innerGroupBounds.x1 + parsedPadding[3], -innerGroupBounds.y1 + parsedPadding[0]), itemGroup;
|
|
44997
45043
|
}
|
|
@@ -53171,19 +53217,33 @@
|
|
|
53171
53217
|
return true;
|
|
53172
53218
|
};
|
|
53173
53219
|
const getDimensionData = (value, axis, coordinate, getDimensionField) => {
|
|
53220
|
+
const scale = axis.getScale();
|
|
53221
|
+
const isDiscreteAxis = isDiscrete(scale.type);
|
|
53174
53222
|
const data = [];
|
|
53175
53223
|
const regions = axis.getRegions();
|
|
53176
53224
|
for (const region of regions) {
|
|
53177
53225
|
const seriesList = region.getSeries();
|
|
53178
53226
|
for (const series of seriesList) {
|
|
53179
53227
|
if (series.coordinate === coordinate) {
|
|
53180
|
-
const dimensionField = getDimensionField(series);
|
|
53228
|
+
const dimensionField = array(getDimensionField(series));
|
|
53181
53229
|
const viewData = series.getViewData()?.latestData;
|
|
53182
53230
|
if (dimensionField && viewData) {
|
|
53183
|
-
|
|
53184
|
-
|
|
53185
|
-
|
|
53186
|
-
|
|
53231
|
+
if (isDiscreteAxis) {
|
|
53232
|
+
data.push({
|
|
53233
|
+
series,
|
|
53234
|
+
datum: viewData.filter((datum) => datum[dimensionField[0]]?.toString() === value?.toString())
|
|
53235
|
+
});
|
|
53236
|
+
}
|
|
53237
|
+
else {
|
|
53238
|
+
data.push({
|
|
53239
|
+
series,
|
|
53240
|
+
datum: viewData.filter((datum) => datum[dimensionField[0]]?.toString() === value?.toString() ||
|
|
53241
|
+
(isValid(datum[dimensionField[0]]) &&
|
|
53242
|
+
isValid(datum[dimensionField[1]]) &&
|
|
53243
|
+
value >= datum[dimensionField[0]] &&
|
|
53244
|
+
value < datum[dimensionField[1]]))
|
|
53245
|
+
});
|
|
53246
|
+
}
|
|
53187
53247
|
}
|
|
53188
53248
|
}
|
|
53189
53249
|
}
|
|
@@ -53276,8 +53336,10 @@
|
|
|
53276
53336
|
}
|
|
53277
53337
|
return null;
|
|
53278
53338
|
};
|
|
53279
|
-
const
|
|
53280
|
-
const
|
|
53339
|
+
const discreteXAxisGetDimensionField = (series) => series.fieldX[0];
|
|
53340
|
+
const discreteYAxisGetDimensionField = (series) => series.fieldY[0];
|
|
53341
|
+
const continuousXAxisGetDimensionField = (series) => [series.fieldX[0], series.fieldX2];
|
|
53342
|
+
const continuousYAxisGetDimensionField = (series) => [series.fieldY[0], series.fieldY2];
|
|
53281
53343
|
const getCartesianDimensionInfo = (chart, pos) => {
|
|
53282
53344
|
if (!chart) {
|
|
53283
53345
|
return null;
|
|
@@ -53292,13 +53354,15 @@
|
|
|
53292
53354
|
const targetAxisInfo = [];
|
|
53293
53355
|
if (xAxisList) {
|
|
53294
53356
|
xAxisList.forEach(axis => {
|
|
53295
|
-
const
|
|
53357
|
+
const isDiscreteAxis = isDiscrete(axis.getScale().type);
|
|
53358
|
+
const info = getDimensionInfoByPosition(axis, x, 'x', isDiscreteAxis ? discreteXAxisGetDimensionField : continuousXAxisGetDimensionField);
|
|
53296
53359
|
info && targetAxisInfo.push(info);
|
|
53297
53360
|
});
|
|
53298
53361
|
}
|
|
53299
53362
|
if (yAxisList) {
|
|
53300
53363
|
yAxisList.forEach(axis => {
|
|
53301
|
-
const
|
|
53364
|
+
const isDiscreteAxis = isDiscrete(axis.getScale().type);
|
|
53365
|
+
const info = getDimensionInfoByPosition(axis, y, 'y', isDiscreteAxis ? discreteYAxisGetDimensionField : continuousYAxisGetDimensionField);
|
|
53302
53366
|
info && targetAxisInfo.push(info);
|
|
53303
53367
|
});
|
|
53304
53368
|
}
|
|
@@ -53307,20 +53371,17 @@
|
|
|
53307
53371
|
}
|
|
53308
53372
|
return targetAxisInfo;
|
|
53309
53373
|
};
|
|
53310
|
-
const
|
|
53374
|
+
const getDimensionInfoByPosition = (axis, posValue, posKey, getDimensionField) => {
|
|
53311
53375
|
const scale = axis.getScale();
|
|
53312
53376
|
const scalePos = posValue - axis.getLayoutStartPoint()[posKey];
|
|
53313
53377
|
if ((scalePos - scale.range()[0]) * (scalePos - scale.range()[1]) > 0) {
|
|
53314
53378
|
return null;
|
|
53315
53379
|
}
|
|
53316
53380
|
const value = scale.invert(scalePos);
|
|
53317
|
-
return
|
|
53381
|
+
return getDimensionInfoByValue(axis, value, getDimensionField);
|
|
53318
53382
|
};
|
|
53319
|
-
const
|
|
53383
|
+
const getDimensionInfoByValue = (axis, value, getDimensionField) => {
|
|
53320
53384
|
const scale = axis.getScale();
|
|
53321
|
-
if (!scale || !isDiscrete(scale.type)) {
|
|
53322
|
-
return null;
|
|
53323
|
-
}
|
|
53324
53385
|
if (isNil(value)) {
|
|
53325
53386
|
return null;
|
|
53326
53387
|
}
|
|
@@ -53329,7 +53390,7 @@
|
|
|
53329
53390
|
if (index < 0) {
|
|
53330
53391
|
index = undefined;
|
|
53331
53392
|
}
|
|
53332
|
-
const data = getDimensionData(value, axis, 'cartesian', getDimensionField ?? (isXAxis(axis.orient) ?
|
|
53393
|
+
const data = getDimensionData(value, axis, 'cartesian', getDimensionField ?? (isXAxis(axis.orient) ? discreteXAxisGetDimensionField : discreteYAxisGetDimensionField));
|
|
53333
53394
|
return { index, value, axis, data };
|
|
53334
53395
|
};
|
|
53335
53396
|
|
|
@@ -53498,7 +53559,7 @@
|
|
|
53498
53559
|
});
|
|
53499
53560
|
const dimensionInfo = [];
|
|
53500
53561
|
axis.forEach(a => {
|
|
53501
|
-
const info =
|
|
53562
|
+
const info = getDimensionInfoByValue(a, v);
|
|
53502
53563
|
if (info) {
|
|
53503
53564
|
dimensionInfo.push(info);
|
|
53504
53565
|
}
|
|
@@ -54071,10 +54132,6 @@
|
|
|
54071
54132
|
function getMapSource(type) {
|
|
54072
54133
|
return geoSourceMap.get(type);
|
|
54073
54134
|
}
|
|
54074
|
-
function clearMapSource() {
|
|
54075
|
-
geoSourceMap.clear();
|
|
54076
|
-
mapDataSet = null;
|
|
54077
|
-
}
|
|
54078
54135
|
|
|
54079
54136
|
function copyOneDataView(d, deep = false) {
|
|
54080
54137
|
let _deep = deep;
|
|
@@ -54679,6 +54736,7 @@
|
|
|
54679
54736
|
this._currentThemeName = ThemeManager.getCurrentThemeName();
|
|
54680
54737
|
this._setSpec(spec);
|
|
54681
54738
|
this._updateCurrentTheme();
|
|
54739
|
+
const specBackground = typeof spec.background === 'string' ? spec.background : null;
|
|
54682
54740
|
this._compiler = new Compiler({
|
|
54683
54741
|
dom: this._container ?? 'none',
|
|
54684
54742
|
canvas: renderCanvas
|
|
@@ -54687,7 +54745,7 @@
|
|
|
54687
54745
|
stage,
|
|
54688
54746
|
pluginList: poptip !== false ? ['poptipForText'] : [],
|
|
54689
54747
|
...restOptions,
|
|
54690
|
-
background:
|
|
54748
|
+
background: specBackground || this._currentTheme.background || this._option.background,
|
|
54691
54749
|
onError: this._onError
|
|
54692
54750
|
});
|
|
54693
54751
|
this._eventDispatcher = new EventDispatcher(this, this._compiler);
|
|
@@ -54911,7 +54969,6 @@
|
|
|
54911
54969
|
this._compiler?.release();
|
|
54912
54970
|
this._eventDispatcher?.release();
|
|
54913
54971
|
this._unBindResizeEvent();
|
|
54914
|
-
clearMapSource();
|
|
54915
54972
|
this._releaseData();
|
|
54916
54973
|
this._chart = null;
|
|
54917
54974
|
this._compiler = null;
|
|
@@ -55647,14 +55704,6 @@
|
|
|
55647
55704
|
layoutPaddingBottom = 0;
|
|
55648
55705
|
layoutOffsetX = 0;
|
|
55649
55706
|
layoutOffsetY = 0;
|
|
55650
|
-
_attributeTag = true;
|
|
55651
|
-
getAttributeTag() {
|
|
55652
|
-
return this._attributeTag;
|
|
55653
|
-
}
|
|
55654
|
-
setAttributeTag(tag) {
|
|
55655
|
-
this._attributeTag = tag;
|
|
55656
|
-
return this._attributeTag;
|
|
55657
|
-
}
|
|
55658
55707
|
layoutLevel = LayoutLevel.Region;
|
|
55659
55708
|
layoutZIndex = 0;
|
|
55660
55709
|
chartLayoutRect;
|
|
@@ -58119,7 +58168,7 @@
|
|
|
58119
58168
|
VChart.useMark([ComponentMark, GroupMark, ImageMark]);
|
|
58120
58169
|
Factory.registerRegion('region', Region);
|
|
58121
58170
|
Factory.registerLayout('base', Layout);
|
|
58122
|
-
const version = "1.2.0-beta.
|
|
58171
|
+
const version = "1.2.0-beta.2";
|
|
58123
58172
|
Logger.getInstance(LoggerLevel.Error);
|
|
58124
58173
|
|
|
58125
58174
|
var SeriesMarkNameEnum;
|
|
@@ -58551,7 +58600,7 @@
|
|
|
58551
58600
|
}
|
|
58552
58601
|
stack(stackCache) {
|
|
58553
58602
|
if (stackCache.values.length > 0) {
|
|
58554
|
-
let positiveStart =
|
|
58603
|
+
let positiveStart = 0;
|
|
58555
58604
|
let negativeStart = 0;
|
|
58556
58605
|
let sign = 1;
|
|
58557
58606
|
let value = 0;
|
|
@@ -58572,8 +58621,8 @@
|
|
|
58572
58621
|
value = v[STACK_FIELD_END];
|
|
58573
58622
|
const denominator = value >= 0 ? positiveStart : negativeStart;
|
|
58574
58623
|
sign = value >= 0 ? 1 : -1;
|
|
58575
|
-
v[STACK_FIELD_START_PERCENT] = Math.min(1, v[STACK_FIELD_START] / denominator) * sign;
|
|
58576
|
-
v[STACK_FIELD_END_PERCENT] = Math.min(1, v[STACK_FIELD_END] / denominator) * sign;
|
|
58624
|
+
v[STACK_FIELD_START_PERCENT] = denominator === 0 ? 0 : Math.min(1, v[STACK_FIELD_START] / denominator) * sign;
|
|
58625
|
+
v[STACK_FIELD_END_PERCENT] = denominator === 0 ? 0 : Math.min(1, v[STACK_FIELD_END] / denominator) * sign;
|
|
58577
58626
|
});
|
|
58578
58627
|
}
|
|
58579
58628
|
for (const key in stackCache.nodes) {
|
|
@@ -58665,6 +58714,7 @@
|
|
|
58665
58714
|
padding = { top: 0, left: 0, right: 0, bottom: 0 };
|
|
58666
58715
|
_paddingSpec;
|
|
58667
58716
|
_canvasRect;
|
|
58717
|
+
_backgroundMark;
|
|
58668
58718
|
constructor(spec, option) {
|
|
58669
58719
|
super(option);
|
|
58670
58720
|
this._theme = option.getTheme();
|
|
@@ -58687,6 +58737,7 @@
|
|
|
58687
58737
|
created() {
|
|
58688
58738
|
this.transformSpec(this._spec);
|
|
58689
58739
|
this.createGlobalScale();
|
|
58740
|
+
this.createBackground(this._spec.background);
|
|
58690
58741
|
this.createLayout();
|
|
58691
58742
|
this.createRegion(this._spec.region);
|
|
58692
58743
|
this.createSeries(this._spec.series);
|
|
@@ -58723,6 +58774,28 @@
|
|
|
58723
58774
|
this._updateLayoutRect(viewBox);
|
|
58724
58775
|
this.setLayoutTag(true);
|
|
58725
58776
|
}
|
|
58777
|
+
createBackground(bg) {
|
|
58778
|
+
if (!bg) {
|
|
58779
|
+
return;
|
|
58780
|
+
}
|
|
58781
|
+
if (typeof bg !== 'object') {
|
|
58782
|
+
return;
|
|
58783
|
+
}
|
|
58784
|
+
this._backgroundMark = Factory.createMark(MarkTypeEnum.group, 'chart-background', {
|
|
58785
|
+
model: this,
|
|
58786
|
+
map: this._option.map,
|
|
58787
|
+
getCompiler: this.getCompiler,
|
|
58788
|
+
globalScale: this._globalScale
|
|
58789
|
+
});
|
|
58790
|
+
this._backgroundMark.created();
|
|
58791
|
+
this._backgroundMark.setStyle(convertBackgroundSpec(bg));
|
|
58792
|
+
this._backgroundMark.setStyle({
|
|
58793
|
+
x: () => this._viewBox.x1,
|
|
58794
|
+
y: () => this._viewBox.y1,
|
|
58795
|
+
width: () => this._viewBox.x2 - this._viewBox.x1,
|
|
58796
|
+
height: () => this._viewBox.y2 - this._viewBox.y1
|
|
58797
|
+
});
|
|
58798
|
+
}
|
|
58726
58799
|
createRegion(regionSpec) {
|
|
58727
58800
|
if (!regionSpec) {
|
|
58728
58801
|
return;
|
|
@@ -59297,7 +59370,8 @@
|
|
|
59297
59370
|
large: spec.large,
|
|
59298
59371
|
largeThreshold: spec.largeThreshold,
|
|
59299
59372
|
progressiveStep: spec.progressiveStep,
|
|
59300
|
-
progressiveThreshold: spec.progressiveThreshold
|
|
59373
|
+
progressiveThreshold: spec.progressiveThreshold,
|
|
59374
|
+
background: spec.seriesBackground
|
|
59301
59375
|
};
|
|
59302
59376
|
return series;
|
|
59303
59377
|
}
|
|
@@ -59357,6 +59431,7 @@
|
|
|
59357
59431
|
});
|
|
59358
59432
|
}
|
|
59359
59433
|
compile() {
|
|
59434
|
+
this.compileBackground();
|
|
59360
59435
|
this.compileLayout();
|
|
59361
59436
|
this.compileRegions();
|
|
59362
59437
|
this.compileSeries();
|
|
@@ -59377,6 +59452,21 @@
|
|
|
59377
59452
|
const { width, height } = this.getCanvasRect();
|
|
59378
59453
|
this.getCompiler().setSize(width, height);
|
|
59379
59454
|
}
|
|
59455
|
+
compileBackground() {
|
|
59456
|
+
if (!this._backgroundMark) {
|
|
59457
|
+
return;
|
|
59458
|
+
}
|
|
59459
|
+
this._backgroundMark.compile();
|
|
59460
|
+
this._backgroundMark
|
|
59461
|
+
.getProduct()
|
|
59462
|
+
?.configure({
|
|
59463
|
+
context: {
|
|
59464
|
+
model: this
|
|
59465
|
+
}
|
|
59466
|
+
})
|
|
59467
|
+
.layout(() => {
|
|
59468
|
+
});
|
|
59469
|
+
}
|
|
59380
59470
|
compileRegions() {
|
|
59381
59471
|
this._option.performanceHook?.beforeRegionCompile?.();
|
|
59382
59472
|
this.getAllRegions().forEach(r => {
|
|
@@ -59421,7 +59511,6 @@
|
|
|
59421
59511
|
}
|
|
59422
59512
|
if (model && mark.isUpdated) {
|
|
59423
59513
|
model.bindSceneNode?.(sceneRoot.elements[0]);
|
|
59424
|
-
model.setAttributeTag(true);
|
|
59425
59514
|
return;
|
|
59426
59515
|
}
|
|
59427
59516
|
if (mark.markType === 'group') {
|
|
@@ -64043,13 +64132,14 @@
|
|
|
64043
64132
|
}
|
|
64044
64133
|
return lineMark;
|
|
64045
64134
|
}
|
|
64046
|
-
initSymbolMark(progressive) {
|
|
64135
|
+
initSymbolMark(progressive, isSeriesMark) {
|
|
64047
64136
|
this._symbolMark = this._createMark(lineLikeSeriesMarkMap.point, {
|
|
64048
64137
|
morph: shouldDoMorph(this._spec.animation, this._spec.morph, userAnimationConfig('point', this._spec)),
|
|
64049
64138
|
defaultMorphElementKey: this.getDimensionField()[0],
|
|
64050
64139
|
groupKey: this._seriesField,
|
|
64051
64140
|
label: merge$2({ animation: this._spec.animation }, this._spec.label),
|
|
64052
|
-
progressive
|
|
64141
|
+
progressive,
|
|
64142
|
+
isSeriesMark: !!isSeriesMark
|
|
64053
64143
|
});
|
|
64054
64144
|
return this._symbolMark;
|
|
64055
64145
|
}
|
|
@@ -64196,8 +64286,9 @@
|
|
|
64196
64286
|
large: this._spec.large,
|
|
64197
64287
|
largeThreshold: this._spec.largeThreshold
|
|
64198
64288
|
};
|
|
64199
|
-
this.
|
|
64200
|
-
this.
|
|
64289
|
+
const seriesMark = this._spec.seriesMark ?? 'line';
|
|
64290
|
+
this.initLineMark(progressive, seriesMark === 'line');
|
|
64291
|
+
this.initSymbolMark(progressive, seriesMark === 'point');
|
|
64201
64292
|
}
|
|
64202
64293
|
initMarkStyle() {
|
|
64203
64294
|
this.initLineMarkStyle(this._direction);
|
|
@@ -64212,8 +64303,11 @@
|
|
|
64212
64303
|
}
|
|
64213
64304
|
}
|
|
64214
64305
|
getSeriesStyle(datum) {
|
|
64306
|
+
const isLineAsSeriesMark = this._spec.seriesMark !== 'point';
|
|
64215
64307
|
return (attribute) => {
|
|
64216
|
-
|
|
64308
|
+
if (isLineAsSeriesMark) {
|
|
64309
|
+
attribute === 'fill' && (attribute = 'stroke');
|
|
64310
|
+
}
|
|
64217
64311
|
return this._seriesMark?.getAttribute(attribute, datum) ?? null;
|
|
64218
64312
|
};
|
|
64219
64313
|
}
|
|
@@ -64651,14 +64745,15 @@
|
|
|
64651
64745
|
largeThreshold: this._spec.largeThreshold
|
|
64652
64746
|
};
|
|
64653
64747
|
const isAreaVisible = this._spec.area?.visible !== false && this._spec.area?.style?.visible !== false;
|
|
64748
|
+
const seriesMark = this._spec.seriesMark ?? 'area';
|
|
64654
64749
|
this._areaMark = this._createMark(AreaSeries.mark.area, {
|
|
64655
64750
|
groupKey: this._seriesField,
|
|
64656
64751
|
defaultMorphElementKey: this.getDimensionField()[0],
|
|
64657
64752
|
progressive,
|
|
64658
|
-
isSeriesMark: isAreaVisible
|
|
64753
|
+
isSeriesMark: isAreaVisible && seriesMark === 'area'
|
|
64659
64754
|
});
|
|
64660
|
-
this.initLineMark(progressive, !isAreaVisible);
|
|
64661
|
-
this.initSymbolMark(progressive);
|
|
64755
|
+
this.initLineMark(progressive, seriesMark === 'line' || (seriesMark === 'area' && !isAreaVisible));
|
|
64756
|
+
this.initSymbolMark(progressive, seriesMark === 'point');
|
|
64662
64757
|
}
|
|
64663
64758
|
initMarkStyle() {
|
|
64664
64759
|
const userCurveType = this.getSpec().area?.style?.curveType ?? this.getSpec().line?.style?.curveType;
|
|
@@ -66577,7 +66672,7 @@
|
|
|
66577
66672
|
}, {
|
|
66578
66673
|
morph: shouldDoMorph(this._spec.animation, this._spec.morph, userAnimationConfig(this.type, this._spec)),
|
|
66579
66674
|
defaultMorphElementKey: this._seriesField,
|
|
66580
|
-
key:
|
|
66675
|
+
key: DEFAULT_DATA_KEY,
|
|
66581
66676
|
groupKey: this._seriesField,
|
|
66582
66677
|
skipBeforeLayouted: true,
|
|
66583
66678
|
isSeriesMark: true
|
|
@@ -67368,9 +67463,10 @@
|
|
|
67368
67463
|
largeThreshold: this._spec.largeThreshold
|
|
67369
67464
|
};
|
|
67370
67465
|
const isAreaVisible = this._spec.area?.visible !== false && this._spec.area?.style?.visible !== false;
|
|
67371
|
-
this.
|
|
67372
|
-
this.
|
|
67373
|
-
this.
|
|
67466
|
+
const seriesMark = this._spec.seriesMark ?? 'area';
|
|
67467
|
+
this.initAreaMark(progressive, isAreaVisible && seriesMark === 'area');
|
|
67468
|
+
this.initLineMark(progressive, seriesMark === 'line' || (seriesMark === 'area' && !isAreaVisible));
|
|
67469
|
+
this.initSymbolMark(progressive, seriesMark === 'point');
|
|
67374
67470
|
}
|
|
67375
67471
|
initMarkStyle() {
|
|
67376
67472
|
this.initAreaMarkStyle();
|
|
@@ -70889,6 +70985,16 @@
|
|
|
70889
70985
|
}
|
|
70890
70986
|
setValueFieldToPercent() {
|
|
70891
70987
|
}
|
|
70988
|
+
updateSpec(spec) {
|
|
70989
|
+
const originalSpec = this._originalSpec;
|
|
70990
|
+
const result = super.updateSpec(spec);
|
|
70991
|
+
if (!isEqual$1(originalSpec, spec)) {
|
|
70992
|
+
result.reMake = true;
|
|
70993
|
+
result.reCompile = true;
|
|
70994
|
+
return result;
|
|
70995
|
+
}
|
|
70996
|
+
return result;
|
|
70997
|
+
}
|
|
70892
70998
|
}
|
|
70893
70999
|
|
|
70894
71000
|
class WordCloudSeries extends BaseWordCloudSeries {
|
|
@@ -73904,6 +74010,29 @@
|
|
|
73904
74010
|
else {
|
|
73905
74011
|
data = data[0];
|
|
73906
74012
|
}
|
|
74013
|
+
if (op.sourceField !== 'source' || op.targetField !== 'target') {
|
|
74014
|
+
for (const key in data) {
|
|
74015
|
+
if (key === 'links') {
|
|
74016
|
+
const updatedData = [];
|
|
74017
|
+
data[key].forEach((datum) => {
|
|
74018
|
+
const updatedDatum = {};
|
|
74019
|
+
for (const key in datum) {
|
|
74020
|
+
if (key === op.sourceField) {
|
|
74021
|
+
updatedDatum.source = datum[op.sourceField];
|
|
74022
|
+
}
|
|
74023
|
+
else if (key === op.targetField) {
|
|
74024
|
+
updatedDatum.target = datum[op.targetField];
|
|
74025
|
+
}
|
|
74026
|
+
else {
|
|
74027
|
+
updatedDatum[key] = datum[key];
|
|
74028
|
+
}
|
|
74029
|
+
}
|
|
74030
|
+
updatedData.push(updatedDatum);
|
|
74031
|
+
});
|
|
74032
|
+
data[key] = updatedData;
|
|
74033
|
+
}
|
|
74034
|
+
}
|
|
74035
|
+
}
|
|
73907
74036
|
const layout = new SankeyLayout(op);
|
|
73908
74037
|
const result = [];
|
|
73909
74038
|
result.push(layout.layout(data, view));
|
|
@@ -74083,13 +74212,15 @@
|
|
|
74083
74212
|
y1: this._viewBox.y2
|
|
74084
74213
|
};
|
|
74085
74214
|
},
|
|
74215
|
+
sourceField: this._spec.sourceField,
|
|
74216
|
+
targetField: this._spec.targetField,
|
|
74086
74217
|
direction: this._spec.direction,
|
|
74087
|
-
nodeAlign: this._spec.nodeAlign,
|
|
74088
|
-
nodeGap: this._spec.nodeGap,
|
|
74089
|
-
nodeWidth: this._spec.nodeWidth,
|
|
74218
|
+
nodeAlign: this._spec.nodeAlign ?? 'justify',
|
|
74219
|
+
nodeGap: this._spec.nodeGap ?? 8,
|
|
74220
|
+
nodeWidth: this._spec.nodeWidth ?? 10,
|
|
74090
74221
|
linkWidth: this._spec.linkWidth,
|
|
74091
74222
|
minStepWidth: this._spec.minStepWidth,
|
|
74092
|
-
minNodeHeight: this._spec.minNodeHeight,
|
|
74223
|
+
minNodeHeight: this._spec.minNodeHeight ?? 4,
|
|
74093
74224
|
minLinkHeight: this._spec.minLinkHeight,
|
|
74094
74225
|
iterations: this._spec.iterations,
|
|
74095
74226
|
nodeKey: this._spec.nodeKey,
|
|
@@ -75867,7 +75998,8 @@
|
|
|
75867
75998
|
invalidType: spec.invalidType || 'break',
|
|
75868
75999
|
point: spec.point,
|
|
75869
76000
|
line: spec.line,
|
|
75870
|
-
area: spec.area
|
|
76001
|
+
area: spec.area,
|
|
76002
|
+
seriesMark: spec.seriesMark ?? 'area'
|
|
75871
76003
|
};
|
|
75872
76004
|
}
|
|
75873
76005
|
transformSpec(spec) {
|
|
@@ -76404,7 +76536,8 @@
|
|
|
76404
76536
|
...super._getDefaultSeriesSpec(spec),
|
|
76405
76537
|
invalidType: spec.invalidType || 'break',
|
|
76406
76538
|
point: spec.point,
|
|
76407
|
-
line: spec.line
|
|
76539
|
+
line: spec.line,
|
|
76540
|
+
seriesMark: spec.seriesMark ?? 'line'
|
|
76408
76541
|
};
|
|
76409
76542
|
}
|
|
76410
76543
|
transformSpec(spec) {
|
|
@@ -76698,7 +76831,8 @@
|
|
|
76698
76831
|
percent: spec.percent,
|
|
76699
76832
|
area: merge$2({
|
|
76700
76833
|
visible: false
|
|
76701
|
-
}, spec.area)
|
|
76834
|
+
}, spec.area),
|
|
76835
|
+
seriesMark: spec.seriesMark ?? 'area'
|
|
76702
76836
|
};
|
|
76703
76837
|
}
|
|
76704
76838
|
transformSpec(spec) {
|
|
@@ -81155,8 +81289,19 @@
|
|
|
81155
81289
|
if (!this._expand) {
|
|
81156
81290
|
return;
|
|
81157
81291
|
}
|
|
81158
|
-
|
|
81159
|
-
|
|
81292
|
+
let domainMin = domain[0];
|
|
81293
|
+
let domainMax = domain[domain.length - 1];
|
|
81294
|
+
if (domainMin === domainMax) {
|
|
81295
|
+
if (domainMax === 0) {
|
|
81296
|
+
domainMax = 1;
|
|
81297
|
+
}
|
|
81298
|
+
else if (domainMax > 0) {
|
|
81299
|
+
domainMin = 0;
|
|
81300
|
+
}
|
|
81301
|
+
else if (domainMax < 0) {
|
|
81302
|
+
domainMax = 0;
|
|
81303
|
+
}
|
|
81304
|
+
}
|
|
81160
81305
|
if (isValid(this._expand.min)) {
|
|
81161
81306
|
domain[0] = domainMin - (domainMax - domainMin) * this._expand.min;
|
|
81162
81307
|
}
|
|
@@ -81165,6 +81310,10 @@
|
|
|
81165
81310
|
}
|
|
81166
81311
|
}
|
|
81167
81312
|
niceDomain(domain) {
|
|
81313
|
+
const { min: userMin, max: userMax } = getLinearAxisSpecDomain(this._spec);
|
|
81314
|
+
if (isValid(userMin) || isValid(userMax)) {
|
|
81315
|
+
return domain;
|
|
81316
|
+
}
|
|
81168
81317
|
if (Math.abs(minInArray(domain) - maxInArray(domain)) <= 1e-12) {
|
|
81169
81318
|
let num = domain[0];
|
|
81170
81319
|
const flag = num >= 0 ? 1 : -1;
|
|
@@ -82110,7 +82259,7 @@
|
|
|
82110
82259
|
selectedData.forEach(s => {
|
|
82111
82260
|
selectedFilter[s] = true;
|
|
82112
82261
|
});
|
|
82113
|
-
const datumField = field();
|
|
82262
|
+
const datumField = field() ?? DEFAULT_DATA_SERIES_FIELD;
|
|
82114
82263
|
if (isValid(datumField)) {
|
|
82115
82264
|
data = data.filter(d => selectedFilter[d[datumField]] === true);
|
|
82116
82265
|
}
|
|
@@ -82819,7 +82968,6 @@
|
|
|
82819
82968
|
}
|
|
82820
82969
|
updateDatum(datum) {
|
|
82821
82970
|
this._activeDatum = datum;
|
|
82822
|
-
this.setAttributeTag(true);
|
|
82823
82971
|
this._displayData.updateData();
|
|
82824
82972
|
const attrs = this._getIndicatorAttrs();
|
|
82825
82973
|
this._createOrUpdateIndicatorComponent(attrs);
|
|
@@ -83204,9 +83352,26 @@
|
|
|
83204
83352
|
this._actualScale = this._spec.zoomLimit?.max;
|
|
83205
83353
|
scale = this._spec.zoomLimit?.max / _lastActualScale;
|
|
83206
83354
|
}
|
|
83207
|
-
event
|
|
83355
|
+
if (event) {
|
|
83356
|
+
event.zoomDelta = scale;
|
|
83357
|
+
}
|
|
83208
83358
|
this.zoom(scale, [params.zoomX, params.zoomY]);
|
|
83359
|
+
return scale;
|
|
83209
83360
|
};
|
|
83361
|
+
dispatchZoom(zoomDelta, center) {
|
|
83362
|
+
const scaleCenter = center || {
|
|
83363
|
+
x: this.getLayoutStartPoint().x + this.getLayoutRect().width / 2,
|
|
83364
|
+
y: this.getLayoutStartPoint().y + this.getLayoutRect().height / 2
|
|
83365
|
+
};
|
|
83366
|
+
const scale = this._handleChartZoom({ zoomDelta, zoomX: scaleCenter.x, zoomY: scaleCenter.y });
|
|
83367
|
+
if (scale !== 1) {
|
|
83368
|
+
this.event.emit('zoom', {
|
|
83369
|
+
scale,
|
|
83370
|
+
scaleCenter,
|
|
83371
|
+
model: this
|
|
83372
|
+
});
|
|
83373
|
+
}
|
|
83374
|
+
}
|
|
83210
83375
|
initEvent() {
|
|
83211
83376
|
this.event.on(ChartEvent.scaleUpdate, { filter: ({ model }) => model?.id === this.id }, this.effect.scaleUpdate.bind(this));
|
|
83212
83377
|
if (this._spec.roam) {
|
|
@@ -87636,6 +87801,9 @@
|
|
|
87636
87801
|
else if (targetDimensionInfo.length > 1) {
|
|
87637
87802
|
const dimensionAxisInfo = targetDimensionInfo.filter(info => {
|
|
87638
87803
|
const axis = info.axis;
|
|
87804
|
+
if (!isDiscrete(axis.getScale().type)) {
|
|
87805
|
+
return false;
|
|
87806
|
+
}
|
|
87639
87807
|
let firstSeries;
|
|
87640
87808
|
for (const region of axis?.getRegions() ?? []) {
|
|
87641
87809
|
for (const series of region.getSeries()) {
|
|
@@ -87648,7 +87816,7 @@
|
|
|
87648
87816
|
break;
|
|
87649
87817
|
}
|
|
87650
87818
|
}
|
|
87651
|
-
if (isValid(firstSeries) && firstSeries.getDimensionField() === firstSeries.fieldY) {
|
|
87819
|
+
if (isValid(firstSeries) && firstSeries.getDimensionField()[0] === firstSeries.fieldY[0]) {
|
|
87652
87820
|
return axis.orient === 'left' || axis.orient === 'right';
|
|
87653
87821
|
}
|
|
87654
87822
|
return axis.orient === 'bottom' || axis.orient === 'top';
|