@visactor/vchart 1.12.3 → 1.12.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/es5/index.js +2 -2
- package/build/index.js +818 -394
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/base/base-chart.d.ts +1 -0
- package/cjs/chart/base/base-chart.js +5 -0
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/chart/interface/chart.d.ts +1 -0
- package/cjs/chart/interface/chart.js.map +1 -1
- package/cjs/chart/sankey/sankey-transformer.js +1 -0
- package/cjs/chart/sankey/sankey-transformer.js.map +1 -1
- package/cjs/component/axis/base-axis.d.ts +1 -1
- package/cjs/component/axis/base-axis.js +5 -3
- package/cjs/component/axis/base-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/axis.d.ts +3 -2
- package/cjs/component/axis/cartesian/axis.js +32 -16
- package/cjs/component/axis/cartesian/axis.js.map +1 -1
- package/cjs/component/axis/cartesian/interface/common.js.map +1 -1
- package/cjs/component/axis/cartesian/linear-axis.d.ts +5 -1
- package/cjs/component/axis/cartesian/linear-axis.js +37 -1
- package/cjs/component/axis/cartesian/linear-axis.js.map +1 -1
- package/cjs/component/axis/cartesian/time-axis.js +4 -1
- package/cjs/component/axis/cartesian/time-axis.js.map +1 -1
- package/cjs/component/axis/interface/common.js.map +1 -1
- package/cjs/component/axis/interface/spec.d.ts +5 -1
- package/cjs/component/axis/interface/spec.js.map +1 -1
- package/cjs/component/axis/mixin/linear-axis-mixin.d.ts +7 -1
- package/cjs/component/axis/mixin/linear-axis-mixin.js +40 -16
- package/cjs/component/axis/mixin/linear-axis-mixin.js.map +1 -1
- package/cjs/component/axis/mixin/util/break-data.d.ts +4 -0
- package/cjs/component/axis/mixin/util/break-data.js +39 -0
- package/cjs/component/axis/mixin/util/break-data.js.map +1 -0
- package/cjs/component/axis/polar/axis.js +8 -2
- package/cjs/component/axis/polar/axis.js.map +1 -1
- package/cjs/component/axis/util.d.ts +3 -0
- package/cjs/component/axis/util.js +6 -2
- package/cjs/component/axis/util.js.map +1 -1
- package/cjs/component/brush/brush.js +4 -1
- package/cjs/component/brush/brush.js.map +1 -1
- package/cjs/component/crosshair/cartesian.d.ts +1 -0
- package/cjs/component/crosshair/cartesian.js +12 -2
- package/cjs/component/crosshair/cartesian.js.map +1 -1
- package/cjs/component/custom-mark/custom-mark.js +1 -1
- package/cjs/component/custom-mark/custom-mark.js.map +1 -1
- package/cjs/component/data-zoom/data-filter-base-component.js +9 -7
- package/cjs/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/cjs/component/data-zoom/data-zoom/data-zoom.js +1 -1
- package/cjs/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
- package/cjs/component/data-zoom/util.js +3 -2
- package/cjs/component/data-zoom/util.js.map +1 -1
- package/cjs/component/label/label.js +4 -4
- package/cjs/component/label/label.js.map +1 -1
- package/cjs/component/tooltip/processor/base.d.ts +1 -1
- package/cjs/component/tooltip/processor/base.js +1 -2
- package/cjs/component/tooltip/processor/base.js.map +1 -1
- package/cjs/component/tooltip/processor/dimension-tooltip.js +1 -6
- package/cjs/component/tooltip/processor/dimension-tooltip.js.map +1 -1
- package/cjs/component/tooltip/processor/group-tooltip.js +4 -4
- package/cjs/component/tooltip/processor/group-tooltip.js.map +1 -1
- package/cjs/component/tooltip/tooltip.js +2 -6
- package/cjs/component/tooltip/tooltip.js.map +1 -1
- package/cjs/constant/layout.d.ts +1 -0
- package/cjs/constant/layout.js +11 -10
- package/cjs/constant/layout.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.d.ts +1 -0
- package/cjs/core/vchart.js +3 -0
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/interaction/interaction.d.ts +2 -0
- package/cjs/interaction/interaction.js +10 -0
- package/cjs/interaction/interaction.js.map +1 -1
- package/cjs/interaction/interface.d.ts +2 -0
- package/cjs/interaction/interface.js.map +1 -1
- package/cjs/model/tooltip-helper.d.ts +8 -6
- package/cjs/model/tooltip-helper.js +1 -4
- package/cjs/model/tooltip-helper.js.map +1 -1
- package/cjs/plugin/components/axis-sync/tick-align-transform.js +3 -3
- package/cjs/plugin/components/axis-sync/tick-align-transform.js.map +1 -1
- package/cjs/plugin/components/axis-sync/zero-align-transform.js +5 -3
- package/cjs/plugin/components/axis-sync/zero-align-transform.js.map +1 -1
- package/cjs/region/region.js +4 -3
- package/cjs/region/region.js.map +1 -1
- package/cjs/series/area/area.js +3 -3
- package/cjs/series/area/area.js.map +1 -1
- package/cjs/series/bar/bar.js +4 -4
- package/cjs/series/bar/bar.js.map +1 -1
- package/cjs/series/bar/interface.d.ts +5 -1
- package/cjs/series/bar/interface.js.map +1 -1
- package/cjs/series/base/base-series.js +4 -3
- package/cjs/series/base/base-series.js.map +1 -1
- package/cjs/series/dot/dot.js.map +1 -1
- package/cjs/series/dot/tooltip-helper.js +6 -17
- package/cjs/series/dot/tooltip-helper.js.map +1 -1
- package/cjs/series/gauge/gauge-pointer.js +3 -2
- package/cjs/series/gauge/gauge-pointer.js.map +1 -1
- package/cjs/series/gauge/pointer-tooltip-helper.d.ts +5 -0
- package/cjs/series/gauge/pointer-tooltip-helper.js +21 -0
- package/cjs/series/gauge/pointer-tooltip-helper.js.map +1 -0
- package/cjs/series/line/line.js +2 -2
- package/cjs/series/line/line.js.map +1 -1
- package/cjs/series/link/tooltip-helper.js +5 -16
- package/cjs/series/link/tooltip-helper.js.map +1 -1
- package/cjs/series/pie/pie.js +3 -3
- package/cjs/series/pie/pie.js.map +1 -1
- package/cjs/series/polar/polar.js.map +1 -1
- package/cjs/series/radar/radar.js +3 -3
- package/cjs/series/radar/radar.js.map +1 -1
- package/cjs/series/range-area/range-area.js +1 -1
- package/cjs/series/range-area/range-area.js.map +1 -1
- package/cjs/series/sankey/interface.d.ts +1 -0
- package/cjs/series/sankey/interface.js.map +1 -1
- package/cjs/series/sankey/sankey.d.ts +0 -1
- package/cjs/series/sankey/sankey.js +1 -0
- package/cjs/series/sankey/sankey.js.map +1 -1
- package/cjs/series/word-cloud/base.js +9 -10
- package/cjs/series/word-cloud/base.js.map +1 -1
- package/cjs/util/array.d.ts +1 -0
- package/cjs/util/array.js +11 -2
- package/cjs/util/array.js.map +1 -1
- package/esm/chart/base/base-chart.d.ts +1 -0
- package/esm/chart/base/base-chart.js +5 -0
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/chart/interface/chart.d.ts +1 -0
- package/esm/chart/interface/chart.js.map +1 -1
- package/esm/chart/sankey/sankey-transformer.js +1 -0
- package/esm/chart/sankey/sankey-transformer.js.map +1 -1
- package/esm/component/axis/base-axis.d.ts +1 -1
- package/esm/component/axis/base-axis.js +6 -2
- package/esm/component/axis/base-axis.js.map +1 -1
- package/esm/component/axis/cartesian/axis.d.ts +3 -2
- package/esm/component/axis/cartesian/axis.js +23 -14
- package/esm/component/axis/cartesian/axis.js.map +1 -1
- package/esm/component/axis/cartesian/interface/common.js.map +1 -1
- package/esm/component/axis/cartesian/linear-axis.d.ts +5 -1
- package/esm/component/axis/cartesian/linear-axis.js +40 -1
- package/esm/component/axis/cartesian/linear-axis.js.map +1 -1
- package/esm/component/axis/cartesian/time-axis.js +3 -3
- package/esm/component/axis/cartesian/time-axis.js.map +1 -1
- package/esm/component/axis/interface/common.js.map +1 -1
- package/esm/component/axis/interface/spec.d.ts +5 -1
- package/esm/component/axis/interface/spec.js.map +1 -1
- package/esm/component/axis/mixin/linear-axis-mixin.d.ts +7 -1
- package/esm/component/axis/mixin/linear-axis-mixin.js +40 -17
- package/esm/component/axis/mixin/linear-axis-mixin.js.map +1 -1
- package/esm/component/axis/mixin/util/break-data.d.ts +4 -0
- package/esm/component/axis/mixin/util/break-data.js +31 -0
- package/esm/component/axis/mixin/util/break-data.js.map +1 -0
- package/esm/component/axis/polar/axis.js +4 -3
- package/esm/component/axis/polar/axis.js.map +1 -1
- package/esm/component/axis/util.d.ts +3 -0
- package/esm/component/axis/util.js +4 -0
- package/esm/component/axis/util.js.map +1 -1
- package/esm/component/brush/brush.js +2 -2
- package/esm/component/brush/brush.js.map +1 -1
- package/esm/component/crosshair/cartesian.d.ts +1 -0
- package/esm/component/crosshair/cartesian.js +12 -2
- package/esm/component/crosshair/cartesian.js.map +1 -1
- package/esm/component/custom-mark/custom-mark.js +1 -1
- package/esm/component/custom-mark/custom-mark.js.map +1 -1
- package/esm/component/data-zoom/data-filter-base-component.js +6 -6
- package/esm/component/data-zoom/data-filter-base-component.js.map +1 -1
- package/esm/component/data-zoom/data-zoom/data-zoom.js +2 -2
- package/esm/component/data-zoom/data-zoom/data-zoom.js.map +1 -1
- package/esm/component/data-zoom/util.js +3 -1
- package/esm/component/data-zoom/util.js.map +1 -1
- package/esm/component/label/label.js +5 -5
- package/esm/component/label/label.js.map +1 -1
- package/esm/component/tooltip/processor/base.d.ts +1 -1
- package/esm/component/tooltip/processor/base.js +1 -2
- package/esm/component/tooltip/processor/base.js.map +1 -1
- package/esm/component/tooltip/processor/dimension-tooltip.js +1 -6
- package/esm/component/tooltip/processor/dimension-tooltip.js.map +1 -1
- package/esm/component/tooltip/processor/group-tooltip.js +4 -4
- package/esm/component/tooltip/processor/group-tooltip.js.map +1 -1
- package/esm/component/tooltip/tooltip.js +2 -5
- package/esm/component/tooltip/tooltip.js.map +1 -1
- package/esm/constant/layout.d.ts +1 -0
- package/esm/constant/layout.js +11 -10
- package/esm/constant/layout.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.d.ts +1 -0
- package/esm/core/vchart.js +3 -0
- package/esm/core/vchart.js.map +1 -1
- package/esm/interaction/interaction.d.ts +2 -0
- package/esm/interaction/interaction.js +10 -0
- package/esm/interaction/interaction.js.map +1 -1
- package/esm/interaction/interface.d.ts +2 -0
- package/esm/interaction/interface.js.map +1 -1
- package/esm/model/tooltip-helper.d.ts +8 -6
- package/esm/model/tooltip-helper.js +1 -4
- package/esm/model/tooltip-helper.js.map +1 -1
- package/esm/plugin/components/axis-sync/tick-align-transform.js +4 -2
- package/esm/plugin/components/axis-sync/tick-align-transform.js.map +1 -1
- package/esm/plugin/components/axis-sync/zero-align-transform.js +4 -4
- package/esm/plugin/components/axis-sync/zero-align-transform.js.map +1 -1
- package/esm/region/region.js +4 -3
- package/esm/region/region.js.map +1 -1
- package/esm/series/area/area.js +3 -3
- package/esm/series/area/area.js.map +1 -1
- package/esm/series/bar/bar.js +5 -5
- package/esm/series/bar/bar.js.map +1 -1
- package/esm/series/bar/interface.d.ts +5 -1
- package/esm/series/bar/interface.js.map +1 -1
- package/esm/series/base/base-series.js +5 -2
- package/esm/series/base/base-series.js.map +1 -1
- package/esm/series/dot/dot.js.map +1 -1
- package/esm/series/dot/tooltip-helper.js +6 -17
- package/esm/series/dot/tooltip-helper.js.map +1 -1
- package/esm/series/gauge/gauge-pointer.js +3 -1
- package/esm/series/gauge/gauge-pointer.js.map +1 -1
- package/esm/series/gauge/pointer-tooltip-helper.d.ts +5 -0
- package/esm/series/gauge/pointer-tooltip-helper.js +15 -0
- package/esm/series/gauge/pointer-tooltip-helper.js.map +1 -0
- package/esm/series/line/line.js +2 -2
- package/esm/series/line/line.js.map +1 -1
- package/esm/series/link/tooltip-helper.js +5 -16
- package/esm/series/link/tooltip-helper.js.map +1 -1
- package/esm/series/pie/pie.js +3 -3
- package/esm/series/pie/pie.js.map +1 -1
- package/esm/series/polar/polar.js.map +1 -1
- package/esm/series/radar/radar.js +3 -3
- package/esm/series/radar/radar.js.map +1 -1
- package/esm/series/range-area/range-area.js +1 -1
- package/esm/series/range-area/range-area.js.map +1 -1
- package/esm/series/sankey/interface.d.ts +1 -0
- package/esm/series/sankey/interface.js.map +1 -1
- package/esm/series/sankey/sankey.d.ts +0 -1
- package/esm/series/sankey/sankey.js +1 -0
- package/esm/series/sankey/sankey.js.map +1 -1
- package/esm/series/word-cloud/base.js +9 -10
- package/esm/series/word-cloud/base.js.map +1 -1
- package/esm/util/array.d.ts +1 -0
- package/esm/util/array.js +9 -0
- package/esm/util/array.js.map +1 -1
- package/package.json +15 -15
package/build/index.js
CHANGED
|
@@ -13490,7 +13490,9 @@
|
|
|
13490
13490
|
if (children.length) shadowRoot.setTheme({
|
|
13491
13491
|
[children[0].type]: childAttrs
|
|
13492
13492
|
}), children.forEach(element => {
|
|
13493
|
-
|
|
13493
|
+
element.setAttributes({
|
|
13494
|
+
pickable: !1
|
|
13495
|
+
}), shadowRoot.appendChild(element);
|
|
13494
13496
|
});else {
|
|
13495
13497
|
const box = graphic.AABBBounds,
|
|
13496
13498
|
width = box.width(),
|
|
@@ -13502,7 +13504,8 @@
|
|
|
13502
13504
|
x: 0,
|
|
13503
13505
|
y: 0,
|
|
13504
13506
|
width: width,
|
|
13505
|
-
height: height
|
|
13507
|
+
height: height,
|
|
13508
|
+
pickable: !1
|
|
13506
13509
|
});
|
|
13507
13510
|
shadowRoot.appendChild(child), children.push(child);
|
|
13508
13511
|
});
|
|
@@ -13889,7 +13892,7 @@
|
|
|
13889
13892
|
return this._transMatrix || (this._transMatrix = new Matrix()), this.shouldUpdateLocalMatrix() && (this.doUpdateLocalMatrix(), clearTag && this.clearUpdateLocalPositionTag()), this._transMatrix;
|
|
13890
13893
|
}
|
|
13891
13894
|
shouldUpdateAABBBounds() {
|
|
13892
|
-
return this.shadowRoot ? !!(this._updateTag & UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds() : !!(this._updateTag & UpdateTag.UPDATE_BOUNDS);
|
|
13895
|
+
return this.shadowRoot ? (!!(this._updateTag & UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds()) && application.graphicService.validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this) : !!(this._updateTag & UpdateTag.UPDATE_BOUNDS) && application.graphicService.validCheck(this.attribute, this.getGraphicTheme(), this._AABBBounds, this);
|
|
13893
13896
|
}
|
|
13894
13897
|
shouldSelfChangeUpdateAABBBounds() {
|
|
13895
13898
|
return this.shadowRoot ? !!(this._updateTag & UpdateTag.UPDATE_BOUNDS) || this.shadowRoot.shouldUpdateAABBBounds() : !!(this._updateTag & UpdateTag.UPDATE_BOUNDS);
|
|
@@ -18799,7 +18802,6 @@
|
|
|
18799
18802
|
return getTheme$1(this).circle;
|
|
18800
18803
|
}
|
|
18801
18804
|
updateAABBBounds(attribute, circleTheme, aabbBounds, full) {
|
|
18802
|
-
if (!application.graphicService.validCheck(attribute, circleTheme, aabbBounds, this)) return aabbBounds;
|
|
18803
18805
|
this.updatePathProxyAABBBounds(aabbBounds) || (full ? this.updateCircleAABBBoundsImprecise(attribute, circleTheme, aabbBounds) : this.updateCircleAABBBoundsAccurate(attribute, circleTheme, aabbBounds));
|
|
18804
18806
|
const {
|
|
18805
18807
|
tb1: tb1,
|
|
@@ -18992,7 +18994,6 @@
|
|
|
18992
18994
|
return getTheme$1(this).text;
|
|
18993
18995
|
}
|
|
18994
18996
|
updateAABBBounds(attribute, textTheme, aabbBounds) {
|
|
18995
|
-
if (!application.graphicService.validCheck(attribute, textTheme, aabbBounds, this)) return aabbBounds;
|
|
18996
18997
|
const {
|
|
18997
18998
|
text = textTheme.text
|
|
18998
18999
|
} = this.attribute;
|
|
@@ -19969,7 +19970,6 @@
|
|
|
19969
19970
|
return getTheme$1(this).symbol;
|
|
19970
19971
|
}
|
|
19971
19972
|
updateAABBBounds(attribute, symbolTheme, aabbBounds, full) {
|
|
19972
|
-
if (!application.graphicService.validCheck(attribute, symbolTheme, aabbBounds, this)) return aabbBounds;
|
|
19973
19973
|
this.updatePathProxyAABBBounds(aabbBounds) || (full ? this.updateSymbolAABBBoundsImprecise(attribute, symbolTheme, aabbBounds) : this.updateSymbolAABBBoundsAccurate(attribute, symbolTheme, aabbBounds));
|
|
19974
19974
|
const {
|
|
19975
19975
|
tb1: tb1,
|
|
@@ -20047,7 +20047,6 @@
|
|
|
20047
20047
|
return getTheme$1(this).line;
|
|
20048
20048
|
}
|
|
20049
20049
|
updateAABBBounds(attribute, lineTheme, aabbBounds) {
|
|
20050
|
-
if (!application.graphicService.validCheck(attribute, lineTheme, aabbBounds, this)) return aabbBounds;
|
|
20051
20050
|
this.updatePathProxyAABBBounds(aabbBounds) || (attribute.segments ? this.updateLineAABBBoundsBySegments(attribute, lineTheme, aabbBounds) : this.updateLineAABBBoundsByPoints(attribute, lineTheme, aabbBounds)), application.graphicService.updateTempAABBBounds(aabbBounds);
|
|
20052
20051
|
const {
|
|
20053
20052
|
lineJoin = lineTheme.lineJoin
|
|
@@ -20128,7 +20127,6 @@
|
|
|
20128
20127
|
return getTheme$1(this).rect;
|
|
20129
20128
|
}
|
|
20130
20129
|
updateAABBBounds(attribute, rectTheme, aabbBounds) {
|
|
20131
|
-
if (!application.graphicService.validCheck(attribute, rectTheme, aabbBounds, this)) return aabbBounds;
|
|
20132
20130
|
if (!this.updatePathProxyAABBBounds(aabbBounds)) {
|
|
20133
20131
|
let {
|
|
20134
20132
|
width: width,
|
|
@@ -20306,9 +20304,9 @@
|
|
|
20306
20304
|
return getTheme$1(this).glyph;
|
|
20307
20305
|
}
|
|
20308
20306
|
updateAABBBounds(attribute, theme, aabbBounds) {
|
|
20309
|
-
return
|
|
20307
|
+
return this.getSubGraphic().forEach(node => {
|
|
20310
20308
|
aabbBounds.union(node.AABBBounds);
|
|
20311
|
-
}), aabbBounds
|
|
20309
|
+
}), aabbBounds;
|
|
20312
20310
|
}
|
|
20313
20311
|
doUpdateAABBBounds() {
|
|
20314
20312
|
this._AABBBounds.clear();
|
|
@@ -20632,7 +20630,6 @@
|
|
|
20632
20630
|
return getTheme$1(this).image;
|
|
20633
20631
|
}
|
|
20634
20632
|
updateAABBBounds(attribute, imageTheme, aabbBounds) {
|
|
20635
|
-
if (!application.graphicService.validCheck(attribute, imageTheme, aabbBounds, this)) return aabbBounds;
|
|
20636
20633
|
if (!this.updatePathProxyAABBBounds(aabbBounds)) {
|
|
20637
20634
|
const {
|
|
20638
20635
|
width = imageTheme.width,
|
|
@@ -20906,7 +20903,6 @@
|
|
|
20906
20903
|
return getTheme$1(this).richtext;
|
|
20907
20904
|
}
|
|
20908
20905
|
updateAABBBounds(attribute, richtextTheme, aabbBounds) {
|
|
20909
|
-
if (!application.graphicService.validCheck(attribute, richtextTheme, aabbBounds, this)) return aabbBounds;
|
|
20910
20906
|
const {
|
|
20911
20907
|
width = richtextTheme.width,
|
|
20912
20908
|
height = richtextTheme.height,
|
|
@@ -21123,7 +21119,6 @@
|
|
|
21123
21119
|
return getTheme$1(this).path;
|
|
21124
21120
|
}
|
|
21125
21121
|
updateAABBBounds(attribute, pathTheme, aabbBounds) {
|
|
21126
|
-
if (!application.graphicService.validCheck(attribute, pathTheme, aabbBounds, this)) return aabbBounds;
|
|
21127
21122
|
if (!this.updatePathProxyAABBBounds(aabbBounds)) {
|
|
21128
21123
|
const pathShape = this.getParsedPathShape();
|
|
21129
21124
|
aabbBounds.union(pathShape.getBounds());
|
|
@@ -21189,7 +21184,6 @@
|
|
|
21189
21184
|
return getTheme$1(this).area;
|
|
21190
21185
|
}
|
|
21191
21186
|
updateAABBBounds(attribute, areaTheme, aabbBounds) {
|
|
21192
|
-
if (!application.graphicService.validCheck(attribute, areaTheme, aabbBounds, this)) return aabbBounds;
|
|
21193
21187
|
this.updatePathProxyAABBBounds(aabbBounds) || (attribute.segments ? this.updateAreaAABBBoundsBySegments(attribute, areaTheme, aabbBounds) : this.updateAreaAABBBoundsByPoints(attribute, areaTheme, aabbBounds)), application.graphicService.updateTempAABBBounds(aabbBounds);
|
|
21194
21188
|
const {
|
|
21195
21189
|
lineJoin = areaTheme.lineJoin
|
|
@@ -21390,7 +21384,6 @@
|
|
|
21390
21384
|
return getTheme$1(this).arc;
|
|
21391
21385
|
}
|
|
21392
21386
|
updateAABBBounds(attribute, arcTheme, aabbBounds, full) {
|
|
21393
|
-
if (!application.graphicService.validCheck(attribute, arcTheme, aabbBounds, this)) return aabbBounds;
|
|
21394
21387
|
this.updatePathProxyAABBBounds(aabbBounds) || (full ? this.updateArcAABBBoundsImprecise(attribute, arcTheme, aabbBounds) : this.updateArcAABBBoundsAccurate(attribute, arcTheme, aabbBounds));
|
|
21395
21388
|
const {
|
|
21396
21389
|
tb1: tb1,
|
|
@@ -21523,7 +21516,6 @@
|
|
|
21523
21516
|
return getTheme$1(this).polygon;
|
|
21524
21517
|
}
|
|
21525
21518
|
updateAABBBounds(attribute, polygonTheme, aabbBounds) {
|
|
21526
|
-
if (!application.graphicService.validCheck(attribute, polygonTheme, aabbBounds, this)) return aabbBounds;
|
|
21527
21519
|
this.updatePathProxyAABBBounds(aabbBounds) || this.updatePolygonAABBBoundsImprecise(attribute, polygonTheme, aabbBounds), application.graphicService.updateTempAABBBounds(aabbBounds);
|
|
21528
21520
|
const {
|
|
21529
21521
|
lineJoin = polygonTheme.lineJoin
|
|
@@ -21664,6 +21656,9 @@
|
|
|
21664
21656
|
y: 0
|
|
21665
21657
|
}), this.type = "shadowroot", this.shadowHost = graphic;
|
|
21666
21658
|
}
|
|
21659
|
+
clearUpdateBoundTag() {
|
|
21660
|
+
super.clearUpdateBoundTag(), this.shadowHost && this.shadowHost.clearUpdateBoundTag();
|
|
21661
|
+
}
|
|
21667
21662
|
addUpdateBoundTag() {
|
|
21668
21663
|
super.addUpdateBoundTag(), this.shadowHost && this.shadowHost.addUpdateBoundTag();
|
|
21669
21664
|
}
|
|
@@ -22967,7 +22962,7 @@
|
|
|
22967
22962
|
"virtual" === l.layerMode && (l = l.getNativeHandler().mainHandler.layer), list.includes(l) || list.push(l);
|
|
22968
22963
|
}
|
|
22969
22964
|
list.forEach(layer => {
|
|
22970
|
-
layer.renderCount > this.renderCount || (layer.renderCount = this.renderCount + 1, layer.render({
|
|
22965
|
+
layer.renderCount > this.renderCount || (layer.renderCount = this.renderCount + 1, layer === this.interactiveLayer && this.dirtyBounds && this.dirtyBounds.clear(), layer.render({
|
|
22971
22966
|
renderService: this.renderService,
|
|
22972
22967
|
background: layer === this.defaultLayer ? this.background : void 0,
|
|
22973
22968
|
updateBounds: !(!this.dirtyBounds || this.dirtyBounds.empty()),
|
|
@@ -22976,14 +22971,14 @@
|
|
|
22976
22971
|
}, Object.assign({
|
|
22977
22972
|
renderStyle: this.renderStyle
|
|
22978
22973
|
}, params)));
|
|
22979
|
-
}), this.interactiveLayer && !layerList.includes(this.interactiveLayer) && this.interactiveLayer.render({
|
|
22974
|
+
}), this.interactiveLayer && !layerList.includes(this.interactiveLayer) && (this.dirtyBounds && this.dirtyBounds.clear(), this.interactiveLayer.render({
|
|
22980
22975
|
renderService: this.renderService,
|
|
22981
22976
|
updateBounds: !(!this.dirtyBounds || this.dirtyBounds.empty()),
|
|
22982
22977
|
viewBox: this.window.getViewBox(),
|
|
22983
22978
|
transMatrix: this.window.getViewBoxTransform()
|
|
22984
22979
|
}, Object.assign({
|
|
22985
22980
|
renderStyle: this.renderStyle
|
|
22986
|
-
}, params));
|
|
22981
|
+
}, params)));
|
|
22987
22982
|
}
|
|
22988
22983
|
resizeWindow(w, h) {
|
|
22989
22984
|
let rerender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : !0;
|
|
@@ -24611,6 +24606,18 @@
|
|
|
24611
24606
|
Factory$2.registerPlugin("ViewTransform3dPlugin", ViewTransform3dPlugin);
|
|
24612
24607
|
};
|
|
24613
24608
|
|
|
24609
|
+
function combineDomains(domains) {
|
|
24610
|
+
const result = [];
|
|
24611
|
+
for (let index = 0; index < domains.length; index++) {
|
|
24612
|
+
const domain = domains[index];
|
|
24613
|
+
if (index === 0) {
|
|
24614
|
+
result.push(domain[0]);
|
|
24615
|
+
}
|
|
24616
|
+
result.push(domain[1]);
|
|
24617
|
+
}
|
|
24618
|
+
return result;
|
|
24619
|
+
}
|
|
24620
|
+
|
|
24614
24621
|
const warn = (msg, detail) => {
|
|
24615
24622
|
if (isFunction$1(config.warnHandler)) {
|
|
24616
24623
|
config.warnHandler.call(null, msg, detail);
|
|
@@ -30519,10 +30526,10 @@
|
|
|
30519
30526
|
if (visible && isBoolean$1(bgVisible)) {
|
|
30520
30527
|
const bgRect = this.createOrUpdateChild("tag-panel", Object.assign(Object.assign({}, backgroundStyle), {
|
|
30521
30528
|
visible: bgVisible && !!text,
|
|
30522
|
-
x: textShape.AABBBounds.x1,
|
|
30523
|
-
y: textShape.AABBBounds.y1,
|
|
30524
|
-
width: textShape.AABBBounds.width(),
|
|
30525
|
-
height: textShape.AABBBounds.height()
|
|
30529
|
+
x: textShape.AABBBounds.x1 - parsedPadding[1],
|
|
30530
|
+
y: textShape.AABBBounds.y1 - parsedPadding[0],
|
|
30531
|
+
width: textShape.AABBBounds.width() + (parsedPadding[1] + parsedPadding[3]),
|
|
30532
|
+
height: textShape.AABBBounds.height() + (parsedPadding[0] + parsedPadding[2])
|
|
30526
30533
|
}), "rect");
|
|
30527
30534
|
if (isEmpty(null == state ? void 0 : state.panel) || (bgRect.states = state.panel), backgroundStyle.customShape) {
|
|
30528
30535
|
const customShape = backgroundStyle.customShape;
|
|
@@ -31547,9 +31554,9 @@
|
|
|
31547
31554
|
easing: easing,
|
|
31548
31555
|
increaseEffect = !0
|
|
31549
31556
|
} = animationConfig;
|
|
31550
|
-
return prev.animate().to(next.attribute, duration, easing), void (increaseEffect && playIncreaseCount(prev, next, duration, easing));
|
|
31557
|
+
return prev.animate().to(next.attribute, duration, easing), void (increaseEffect && "text" === prev.type && "text" === next.type && playIncreaseCount(prev, next, duration, easing));
|
|
31551
31558
|
}
|
|
31552
|
-
animationConfig.forEach(
|
|
31559
|
+
animationConfig.forEach(cfg => {
|
|
31553
31560
|
const {
|
|
31554
31561
|
duration: duration,
|
|
31555
31562
|
easing: easing,
|
|
@@ -31557,10 +31564,9 @@
|
|
|
31557
31564
|
channel: channel
|
|
31558
31565
|
} = cfg,
|
|
31559
31566
|
{
|
|
31560
|
-
from: from,
|
|
31561
31567
|
to: to
|
|
31562
31568
|
} = update$1(prev, next, channel, cfg.options);
|
|
31563
|
-
isEmpty(to) || prev.animate().to(to, duration, easing), "text"
|
|
31569
|
+
isEmpty(to) || prev.animate().to(to, duration, easing), increaseEffect && "text" === prev.type && "text" === next.type && playIncreaseCount(prev, next, duration, easing);
|
|
31564
31570
|
});
|
|
31565
31571
|
}
|
|
31566
31572
|
const update$1 = (prev, next, channel, options) => {
|
|
@@ -31779,6 +31785,9 @@
|
|
|
31779
31785
|
y: cy + (dy > 0 ? h : -h)
|
|
31780
31786
|
};
|
|
31781
31787
|
}
|
|
31788
|
+
function getAlignOffset(align) {
|
|
31789
|
+
return "left" === align ? 0 : "right" === align ? 1 : .5;
|
|
31790
|
+
}
|
|
31782
31791
|
|
|
31783
31792
|
function loadLabelComponent() {
|
|
31784
31793
|
registerGroup(), registerText(), registerRichtext(), registerLine();
|
|
@@ -31895,7 +31904,7 @@
|
|
|
31895
31904
|
return createTextGraphicByType(textAttrs, "textType");
|
|
31896
31905
|
}
|
|
31897
31906
|
_prepare() {
|
|
31898
|
-
var _a, _b
|
|
31907
|
+
var _a, _b;
|
|
31899
31908
|
const currentBaseMarks = [];
|
|
31900
31909
|
let baseMarks;
|
|
31901
31910
|
if (baseMarks = isFunction$1(this.attribute.getBaseMarks) ? this.attribute.getBaseMarks() : getMarksByName(this.getRootNode(), this.attribute.baseMarkGroupName), baseMarks.forEach(mark => {
|
|
@@ -31922,13 +31931,23 @@
|
|
|
31922
31931
|
textData && baseMark && (isValid$1(textData.id) || (textData.id = `vrender-component-${this.name}-${i}`), this._idToGraphic.set(textData.id, baseMark));
|
|
31923
31932
|
}
|
|
31924
31933
|
if (!1 !== this.attribute.animation) {
|
|
31925
|
-
const
|
|
31934
|
+
const {
|
|
31935
|
+
animation: animation,
|
|
31936
|
+
animationEnter: animationEnter,
|
|
31937
|
+
animationExit: animationExit,
|
|
31938
|
+
animationUpdate: animationUpdate
|
|
31939
|
+
} = this.attribute,
|
|
31940
|
+
animationCfg = isObject$2(animation) ? animation : {};
|
|
31926
31941
|
this._animationConfig = {
|
|
31927
|
-
enter: merge$2({}, DefaultLabelAnimation,
|
|
31928
|
-
exit: merge$2({}, DefaultLabelAnimation,
|
|
31929
|
-
update: isArray$1(
|
|
31942
|
+
enter: !1 !== animationEnter && merge$2({}, DefaultLabelAnimation, animationCfg, null != animationEnter ? animationEnter : {}),
|
|
31943
|
+
exit: !1 !== animationExit && merge$2({}, DefaultLabelAnimation, animationCfg, null != animationExit ? animationExit : {}),
|
|
31944
|
+
update: !1 !== animationUpdate && (isArray$1(animationUpdate) ? animationUpdate : merge$2({}, DefaultLabelAnimation, animationCfg, null != animationUpdate ? animationUpdate : {}))
|
|
31930
31945
|
};
|
|
31931
|
-
}
|
|
31946
|
+
} else this._animationConfig = {
|
|
31947
|
+
enter: !1,
|
|
31948
|
+
exit: !1,
|
|
31949
|
+
update: !1
|
|
31950
|
+
};
|
|
31932
31951
|
}
|
|
31933
31952
|
}
|
|
31934
31953
|
getRelatedGraphic(item) {
|
|
@@ -32093,9 +32112,6 @@
|
|
|
32093
32112
|
};
|
|
32094
32113
|
}
|
|
32095
32114
|
_renderLabels(labels) {
|
|
32096
|
-
!1 === this._enableAnimation || !1 === this.attribute.animation ? this._renderWithOutAnimation(labels) : this._renderWithAnimation(labels);
|
|
32097
|
-
}
|
|
32098
|
-
_renderWithAnimation(labels) {
|
|
32099
32115
|
var _a;
|
|
32100
32116
|
const {
|
|
32101
32117
|
syncState: syncState
|
|
@@ -32110,8 +32126,7 @@
|
|
|
32110
32126
|
labels && labels.forEach((text, index) => {
|
|
32111
32127
|
var _a;
|
|
32112
32128
|
const relatedGraphic = this.getRelatedGraphic(text.attribute),
|
|
32113
|
-
|
|
32114
|
-
textKey = this._isCollectionBase ? textId : relatedGraphic,
|
|
32129
|
+
textKey = this._isCollectionBase ? text.attribute.id : relatedGraphic,
|
|
32115
32130
|
state = (null == prevTextMap ? void 0 : prevTextMap.get(textKey)) ? "update" : "enter";
|
|
32116
32131
|
let labelLine;
|
|
32117
32132
|
if (showLabelLine && (labelLine = this._createLabelLine(text, relatedGraphic)), syncState && this.updateStatesOfLabels([labelLine ? {
|
|
@@ -32119,73 +32134,78 @@
|
|
|
32119
32134
|
labelLine: labelLine
|
|
32120
32135
|
} : {
|
|
32121
32136
|
text: text
|
|
32122
|
-
}], null !== (_a = relatedGraphic.currentStates) && void 0 !== _a ? _a : []), "enter" === state) {
|
|
32123
|
-
if (texts.push(text), currentTextMap.set(textKey, labelLine ? {
|
|
32124
|
-
text: text,
|
|
32125
|
-
labelLine: labelLine
|
|
32126
|
-
} : {
|
|
32127
|
-
text: text
|
|
32128
|
-
}), relatedGraphic) {
|
|
32129
|
-
const {
|
|
32130
|
-
from: from,
|
|
32131
|
-
to: to
|
|
32132
|
-
} = getAnimationAttributes(text.attribute, "fadeIn");
|
|
32133
|
-
this.add(text), labelLine && (labelLines.push(labelLine), this.add(labelLine)), this._syncStateWithRelatedGraphic(relatedGraphic), this._animationConfig.enter.duration > 0 && relatedGraphic.once("animate-bind", a => {
|
|
32134
|
-
text.setAttributes(from), labelLine && labelLine.setAttributes(from);
|
|
32135
|
-
const listener = this._afterRelatedGraphicAttributeUpdate(text, texts, labelLine, labelLines, index, relatedGraphic, to, this._animationConfig.enter);
|
|
32136
|
-
relatedGraphic.on("afterAttributeUpdate", listener);
|
|
32137
|
-
});
|
|
32138
|
-
}
|
|
32139
|
-
} else if ("update" === state) {
|
|
32140
|
-
const prevLabel = prevTextMap.get(textKey);
|
|
32141
|
-
prevTextMap.delete(textKey), currentTextMap.set(textKey, prevLabel);
|
|
32142
|
-
const prevText = prevLabel.text,
|
|
32143
|
-
{
|
|
32144
|
-
duration: duration,
|
|
32145
|
-
easing: easing
|
|
32146
|
-
} = this._animationConfig.update;
|
|
32147
|
-
updateAnimation(prevText, text, this._animationConfig.update), prevLabel.labelLine && labelLine && prevLabel.labelLine.animate().to(labelLine.attribute, duration, easing);
|
|
32148
|
-
}
|
|
32149
|
-
}), prevTextMap.forEach(label => {
|
|
32150
|
-
var _a;
|
|
32151
|
-
null === (_a = label.text) || void 0 === _a || _a.animate().to(getAnimationAttributes(label.text.attribute, "fadeOut").to, this._animationConfig.exit.duration, this._animationConfig.exit.easing).onEnd(() => {
|
|
32152
|
-
this.removeChild(label.text), label.labelLine && this.removeChild(label.labelLine);
|
|
32153
|
-
});
|
|
32154
|
-
}), this._graphicToText = currentTextMap;
|
|
32155
|
-
}
|
|
32156
|
-
_renderWithOutAnimation(labels) {
|
|
32157
|
-
var _a;
|
|
32158
|
-
const {
|
|
32159
|
-
syncState: syncState
|
|
32160
|
-
} = this.attribute,
|
|
32161
|
-
currentTextMap = new Map(),
|
|
32162
|
-
prevTextMap = this._graphicToText || new Map(),
|
|
32163
|
-
{
|
|
32164
|
-
visible: showLabelLine
|
|
32165
|
-
} = null !== (_a = this.attribute.line) && void 0 !== _a ? _a : {};
|
|
32166
|
-
labels && labels.forEach(text => {
|
|
32167
|
-
var _a;
|
|
32168
|
-
const relatedGraphic = this.getRelatedGraphic(text.attribute),
|
|
32169
|
-
state = (null == prevTextMap ? void 0 : prevTextMap.get(relatedGraphic)) ? "update" : "enter",
|
|
32170
|
-
textKey = this._isCollectionBase ? text.attribute.id : relatedGraphic;
|
|
32171
|
-
let labelLine;
|
|
32172
|
-
if (showLabelLine && (labelLine = this._createLabelLine(text, relatedGraphic)), syncState && this.updateStatesOfLabels([labelLine ? {
|
|
32137
|
+
}], null !== (_a = relatedGraphic.currentStates) && void 0 !== _a ? _a : []), "enter" === state) texts.push(text), currentTextMap.set(textKey, labelLine ? {
|
|
32173
32138
|
text: text,
|
|
32174
32139
|
labelLine: labelLine
|
|
32175
32140
|
} : {
|
|
32176
32141
|
text: text
|
|
32177
|
-
}
|
|
32142
|
+
}), this._addLabel({
|
|
32178
32143
|
text: text,
|
|
32179
32144
|
labelLine: labelLine
|
|
32180
|
-
}
|
|
32181
|
-
text: text
|
|
32182
|
-
}), this.add(text), labelLine && this.add(labelLine), this._syncStateWithRelatedGraphic(relatedGraphic);else if ("update" === state) {
|
|
32145
|
+
}, texts, labelLines, index);else if ("update" === state) {
|
|
32183
32146
|
const prevLabel = prevTextMap.get(textKey);
|
|
32184
|
-
prevTextMap.delete(textKey), currentTextMap.set(textKey, prevLabel),
|
|
32147
|
+
prevTextMap.delete(textKey), currentTextMap.set(textKey, prevLabel), this._updateLabel(prevLabel, {
|
|
32148
|
+
text: text,
|
|
32149
|
+
labelLine: labelLine
|
|
32150
|
+
});
|
|
32185
32151
|
}
|
|
32186
|
-
}),
|
|
32152
|
+
}), this._removeLabel(prevTextMap), this._graphicToText = currentTextMap;
|
|
32153
|
+
}
|
|
32154
|
+
_addLabel(label, texts, labelLines, index) {
|
|
32155
|
+
const {
|
|
32156
|
+
text: text,
|
|
32157
|
+
labelLine: labelLine
|
|
32158
|
+
} = label,
|
|
32159
|
+
relatedGraphic = this.getRelatedGraphic(text.attribute);
|
|
32160
|
+
if (this._syncStateWithRelatedGraphic(relatedGraphic), !1 !== this._enableAnimation && !1 !== this._animationConfig.enter) {
|
|
32161
|
+
if (relatedGraphic) {
|
|
32162
|
+
const {
|
|
32163
|
+
from: from,
|
|
32164
|
+
to: to
|
|
32165
|
+
} = getAnimationAttributes(text.attribute, "fadeIn");
|
|
32166
|
+
text && this.add(text), labelLine && (labelLines.push(labelLine), this.add(labelLine)), this._animationConfig.enter.duration > 0 && relatedGraphic.once("animate-bind", a => {
|
|
32167
|
+
text.setAttributes(from), labelLine && labelLine.setAttributes(from);
|
|
32168
|
+
const listener = this._afterRelatedGraphicAttributeUpdate(text, texts, labelLine, labelLines, index, relatedGraphic, to, this._animationConfig.enter);
|
|
32169
|
+
relatedGraphic.on("afterAttributeUpdate", listener);
|
|
32170
|
+
});
|
|
32171
|
+
}
|
|
32172
|
+
} else text && this.add(text), labelLine && this.add(labelLine);
|
|
32173
|
+
}
|
|
32174
|
+
_updateLabel(prevLabel, currentLabel) {
|
|
32175
|
+
const {
|
|
32176
|
+
text: prevText,
|
|
32177
|
+
labelLine: prevLabelLine
|
|
32178
|
+
} = prevLabel,
|
|
32179
|
+
{
|
|
32180
|
+
text: curText,
|
|
32181
|
+
labelLine: curLabelLine
|
|
32182
|
+
} = currentLabel;
|
|
32183
|
+
if (!1 !== this._enableAnimation && !1 !== this._animationConfig.update) {
|
|
32184
|
+
const {
|
|
32185
|
+
duration: duration,
|
|
32186
|
+
easing: easing
|
|
32187
|
+
} = this._animationConfig.update;
|
|
32188
|
+
updateAnimation(prevText, curText, this._animationConfig.update), prevLabelLine && curLabelLine && prevLabel.labelLine.animate().to(curLabelLine.attribute, duration, easing);
|
|
32189
|
+
} else prevLabel.text.setAttributes(curText.attribute), prevLabelLine && curLabelLine && prevLabel.labelLine.setAttributes(curLabelLine.attribute);
|
|
32190
|
+
}
|
|
32191
|
+
_removeLabel(textMap) {
|
|
32192
|
+
const removeLabelAndLine = label => {
|
|
32187
32193
|
this.removeChild(label.text), label.labelLine && this.removeChild(label.labelLine);
|
|
32188
|
-
}
|
|
32194
|
+
};
|
|
32195
|
+
if (!1 !== this._enableAnimation && !1 !== this._animationConfig.exit) {
|
|
32196
|
+
const {
|
|
32197
|
+
duration: duration,
|
|
32198
|
+
easing: easing
|
|
32199
|
+
} = this._animationConfig.exit;
|
|
32200
|
+
textMap.forEach(label => {
|
|
32201
|
+
var _a;
|
|
32202
|
+
null === (_a = label.text) || void 0 === _a || _a.animate().to(getAnimationAttributes(label.text.attribute, "fadeOut").to, duration, easing).onEnd(() => {
|
|
32203
|
+
removeLabelAndLine(label);
|
|
32204
|
+
});
|
|
32205
|
+
});
|
|
32206
|
+
} else textMap.forEach(label => {
|
|
32207
|
+
removeLabelAndLine(label);
|
|
32208
|
+
});
|
|
32189
32209
|
}
|
|
32190
32210
|
updateStatesOfLabels(labels, currentStates) {
|
|
32191
32211
|
labels.forEach(label => {
|
|
@@ -32193,7 +32213,7 @@
|
|
|
32193
32213
|
});
|
|
32194
32214
|
}
|
|
32195
32215
|
_syncStateWithRelatedGraphic(relatedGraphic) {
|
|
32196
|
-
this.attribute.syncState && relatedGraphic.on("afterAttributeUpdate", this._handleRelatedGraphicSetState);
|
|
32216
|
+
this.attribute.syncState && relatedGraphic && relatedGraphic.on("afterAttributeUpdate", this._handleRelatedGraphicSetState);
|
|
32197
32217
|
}
|
|
32198
32218
|
_afterRelatedGraphicAttributeUpdate(text, texts, labelLine, labelLines, index, relatedGraphic, to, _ref) {
|
|
32199
32219
|
let {
|
|
@@ -32523,7 +32543,7 @@
|
|
|
32523
32543
|
restAttributes = __rest$7(attributes, ["data"]);
|
|
32524
32544
|
super((null == options ? void 0 : options.skipDefault) ? attributes : Object.assign({
|
|
32525
32545
|
data: data
|
|
32526
|
-
}, merge$2({}, ArcLabel.defaultAttributes, restAttributes))), this.name = "arc-label", this._ellipsisWidth = 0, this._arcLeft = new Map(), this._arcRight = new Map();
|
|
32546
|
+
}, merge$2({}, ArcLabel.defaultAttributes, restAttributes))), this.name = "arc-label", this._ellipsisWidth = 0, this._arcLeft = new Map(), this._arcRight = new Map(), this._line2MinLength = 0, this._alignOffset = 0;
|
|
32527
32547
|
}
|
|
32528
32548
|
_overlapping(labels) {
|
|
32529
32549
|
return labels;
|
|
@@ -32535,6 +32555,7 @@
|
|
|
32535
32555
|
};
|
|
32536
32556
|
}
|
|
32537
32557
|
_layout(texts) {
|
|
32558
|
+
var _a;
|
|
32538
32559
|
if (!texts || !texts.length) return;
|
|
32539
32560
|
const labels = super._layout(texts),
|
|
32540
32561
|
textBoundsArray = labels.map(label => this.getGraphicBounds(label)),
|
|
@@ -32548,7 +32569,9 @@
|
|
|
32548
32569
|
ellipsisWidth = ellipsisTextBounds.x2 - ellipsisTextBounds.x1;
|
|
32549
32570
|
}
|
|
32550
32571
|
const data = labels.map(label => label.attribute),
|
|
32551
|
-
|
|
32572
|
+
currentMarks = Array.from(this._idToGraphic.values());
|
|
32573
|
+
this._line2MinLength = isFunction$1(this.attribute.line.line2MinLength) ? this.attribute.line.line2MinLength(texts, currentMarks, this.attribute) : this.attribute.line.line2MinLength, this._alignOffset = null !== (_a = isFunction$1(this.attribute.layout.alignOffset) ? this.attribute.layout.alignOffset(texts, currentMarks, this.attribute) : this.attribute.layout.alignOffset) && void 0 !== _a ? _a : 0;
|
|
32574
|
+
const arcs = this.layoutArcLabels(this.attribute.position, this.attribute, currentMarks, data, textBoundsArray, ellipsisWidth);
|
|
32552
32575
|
for (let i = 0; i < data.length; i++) {
|
|
32553
32576
|
const textData = data[i],
|
|
32554
32577
|
basedArc = arcs.find(arc => {
|
|
@@ -32654,13 +32677,12 @@
|
|
|
32654
32677
|
var _a, _b, _c;
|
|
32655
32678
|
const center_x = null !== (_a = currentMarks[0].attribute.x) && void 0 !== _a ? _a : 0,
|
|
32656
32679
|
height = 2 * (null !== (_b = currentMarks[0].attribute.y) && void 0 !== _b ? _b : 0),
|
|
32657
|
-
line2MinLength = attribute.line.line2MinLength,
|
|
32658
32680
|
labelLayout = attribute.layout,
|
|
32659
32681
|
spaceWidth = attribute.spaceWidth;
|
|
32660
32682
|
if (arcs.forEach(arc => {
|
|
32661
32683
|
const direction = isQuadrantLeft(arc.quadrant) ? -1 : 1;
|
|
32662
32684
|
arc.labelPosition = {
|
|
32663
|
-
x: arc.outerCenter.x + direction * (arc.labelSize.width / 2 +
|
|
32685
|
+
x: arc.outerCenter.x + direction * (arc.labelSize.width / 2 + this._line2MinLength + spaceWidth),
|
|
32664
32686
|
y: arc.outerCenter.y
|
|
32665
32687
|
};
|
|
32666
32688
|
}), arcs.sort((a, b) => a.labelPosition.y - b.labelPosition.y), !1 !== attribute.coverEnable || "none" === labelLayout.strategy) {
|
|
@@ -32670,10 +32692,10 @@
|
|
|
32670
32692
|
labelSize: labelSize
|
|
32671
32693
|
} = arc;
|
|
32672
32694
|
arc.labelLimit = labelSize.width, arc.pointB = isQuadrantLeft(arc.quadrant) ? {
|
|
32673
|
-
x: labelPosition.x + labelSize.width / 2 +
|
|
32695
|
+
x: labelPosition.x + labelSize.width / 2 + this._line2MinLength + spaceWidth,
|
|
32674
32696
|
y: labelPosition.y
|
|
32675
32697
|
} : {
|
|
32676
|
-
x: labelPosition.x - labelSize.width / 2 -
|
|
32698
|
+
x: labelPosition.x - labelSize.width / 2 - this._line2MinLength - spaceWidth,
|
|
32677
32699
|
y: labelPosition.y
|
|
32678
32700
|
}, this._computeX(arc, attribute, currentMarks);
|
|
32679
32701
|
}
|
|
@@ -32701,21 +32723,23 @@
|
|
|
32701
32723
|
const width = 2 * center_x;
|
|
32702
32724
|
return arcs.forEach(arc => {
|
|
32703
32725
|
var _a, _b;
|
|
32704
|
-
arc.labelVisible && (isLess(arc.pointB.x,
|
|
32726
|
+
arc.labelVisible && (isLess(arc.pointB.x, this._line2MinLength + spaceWidth) || isGreater(arc.pointB.x, width - this._line2MinLength - spaceWidth)) && (arc.labelVisible = !1), arc.angle = null !== (_b = null === (_a = attribute.textStyle) || void 0 === _a ? void 0 : _a.angle) && void 0 !== _b ? _b : 0, attribute.offsetAngle && (arc.angle += attribute.offsetAngle), arc.labelLine = Object.assign(Object.assign({}, attribute.line), {
|
|
32727
|
+
visible: arc.labelVisible
|
|
32728
|
+
});
|
|
32705
32729
|
}), arcs;
|
|
32706
32730
|
}
|
|
32707
32731
|
_computeX(arc, attribute, currentMarks) {
|
|
32708
32732
|
var _a;
|
|
32709
32733
|
const center = arc.circleCenter,
|
|
32710
|
-
|
|
32711
|
-
|
|
32734
|
+
plotLayout_x1 = 0,
|
|
32735
|
+
plotLayout_x2 = this.attribute.width;
|
|
32736
|
+
this.attribute.height;
|
|
32712
32737
|
let maxRadius = 0;
|
|
32713
32738
|
currentMarks.forEach(currentMark => {
|
|
32714
32739
|
currentMark.attribute.outerRadius > maxRadius && (maxRadius = currentMark.attribute.outerRadius);
|
|
32715
32740
|
});
|
|
32716
32741
|
const radiusRatio = this.computeLayoutOuterRadius(maxRadius, attribute.width, attribute.height),
|
|
32717
32742
|
line1MinLength = attribute.line.line1MinLength,
|
|
32718
|
-
line2MinLength = attribute.line.line2MinLength,
|
|
32719
32743
|
labelLayoutAlign = null === (_a = attribute.layout) || void 0 === _a ? void 0 : _a.align,
|
|
32720
32744
|
spaceWidth = attribute.spaceWidth,
|
|
32721
32745
|
{
|
|
@@ -32729,9 +32753,9 @@
|
|
|
32729
32753
|
}, labelPosition.x = NaN, arc.labelLimit = 0);
|
|
32730
32754
|
const radius = this.computeRadius(radiusRatio, attribute.width, attribute.height),
|
|
32731
32755
|
flag = isQuadrantLeft(quadrant) ? -1 : 1;
|
|
32732
|
-
let cx = 0
|
|
32733
|
-
|
|
32734
|
-
"labelLine" === labelLayoutAlign && (cx = (radius + line1MinLength +
|
|
32756
|
+
let cx = 0,
|
|
32757
|
+
limit = (flag > 0 ? plotLayout_x2 - pointB.x : pointB.x - plotLayout_x1) - this._line2MinLength - spaceWidth;
|
|
32758
|
+
"labelLine" === labelLayoutAlign && (cx = (radius + line1MinLength + this._line2MinLength) * flag + center.x, limit = (flag > 0 ? plotLayout_x2 - cx : cx - plotLayout_x1) - spaceWidth);
|
|
32735
32759
|
const text = this._getFormatLabelText(arc.refDatum, limit);
|
|
32736
32760
|
arc.labelText = text;
|
|
32737
32761
|
let labelWidth = Math.min(limit, arc.labelSize.width);
|
|
@@ -32739,23 +32763,18 @@
|
|
|
32739
32763
|
case "labelLine":
|
|
32740
32764
|
break;
|
|
32741
32765
|
case "edge":
|
|
32742
|
-
cx = flag > 0 ?
|
|
32766
|
+
cx = flag > 0 ? plotLayout_x2 - labelWidth - spaceWidth : plotLayout_x1 + labelWidth + spaceWidth;
|
|
32743
32767
|
break;
|
|
32744
32768
|
default:
|
|
32745
|
-
cx = pointB.x + flag *
|
|
32769
|
+
cx = pointB.x + flag * this._line2MinLength;
|
|
32746
32770
|
}
|
|
32747
32771
|
labelWidth = Math.max(this._ellipsisWidth, labelWidth), arc.labelLimit = labelWidth, arc.pointC = {
|
|
32748
32772
|
x: cx,
|
|
32749
32773
|
y: labelPosition.y
|
|
32750
32774
|
};
|
|
32751
|
-
const
|
|
32752
|
-
|
|
32753
|
-
|
|
32754
|
-
labelPosition.x = (flag > 0 ? plotLayout_width + alignOffset : alignOffset) - flag * targetCenterOffset;
|
|
32755
|
-
} else {
|
|
32756
|
-
const alignOffset = 0;
|
|
32757
|
-
labelPosition.x = cx + alignOffset + flag * (spaceWidth + targetCenterOffset);
|
|
32758
|
-
}
|
|
32775
|
+
const align = this._computeAlign(arc, attribute),
|
|
32776
|
+
targetCenterOffset = getAlignOffset(align) * (arc.labelLimit < arc.labelSize.width ? arc.labelLimit : arc.labelSize.width);
|
|
32777
|
+
"edge" === labelLayoutAlign ? (labelPosition.x = (flag > 0 ? plotLayout_x2 : plotLayout_x1) - flag * targetCenterOffset + flag * this._alignOffset, arc.pointC.x += flag * this._alignOffset) : labelPosition.x = cx + flag * (this._alignOffset + spaceWidth + targetCenterOffset);
|
|
32759
32778
|
}
|
|
32760
32779
|
_computeAlign(arc, attribute) {
|
|
32761
32780
|
var _a, _b, _c, _d, _e, _f;
|
|
@@ -33097,6 +33116,7 @@
|
|
|
33097
33116
|
type: type
|
|
33098
33117
|
} = dataLabel,
|
|
33099
33118
|
id = null !== (_a = dataLabel.id) && void 0 !== _a ? _a : `${baseMarkGroupName}-${type}-${i}`;
|
|
33119
|
+
"arc" === dataLabel.type && (dataLabel.width = size.width, dataLabel.height = size.height);
|
|
33100
33120
|
let component = this._componentMap.get(id);
|
|
33101
33121
|
component ? (component.setBitmapTool(tool), component.setBitmap(bitmap), component.setAttributes(dataLabel), currentComponentMap.set(id, component)) : (component = new labelComponent(dataLabel), component.setBitmap(bitmap), component.setBitmapTool(tool), this.add(component), currentComponentMap.set(id, component));
|
|
33102
33122
|
}
|
|
@@ -33378,7 +33398,7 @@
|
|
|
33378
33398
|
|
|
33379
33399
|
var AXIS_ELEMENT_NAME;
|
|
33380
33400
|
!function (AXIS_ELEMENT_NAME) {
|
|
33381
|
-
AXIS_ELEMENT_NAME.innerView = "inner-view", AXIS_ELEMENT_NAME.axisContainer = "axis-container", AXIS_ELEMENT_NAME.labelContainer = "axis-label-container", AXIS_ELEMENT_NAME.tickContainer = "axis-tick-container", AXIS_ELEMENT_NAME.tick = "axis-tick", AXIS_ELEMENT_NAME.subTick = "axis-sub-tick", AXIS_ELEMENT_NAME.label = "axis-label", AXIS_ELEMENT_NAME.title = "axis-title", AXIS_ELEMENT_NAME.gridContainer = "axis-grid-container", AXIS_ELEMENT_NAME.grid = "axis-grid", AXIS_ELEMENT_NAME.gridRegion = "axis-grid-region", AXIS_ELEMENT_NAME.line = "axis-line", AXIS_ELEMENT_NAME.background = "axis-background", AXIS_ELEMENT_NAME.axisLabelBackground = "axis-label-background";
|
|
33401
|
+
AXIS_ELEMENT_NAME.innerView = "inner-view", AXIS_ELEMENT_NAME.axisContainer = "axis-container", AXIS_ELEMENT_NAME.labelContainer = "axis-label-container", AXIS_ELEMENT_NAME.tickContainer = "axis-tick-container", AXIS_ELEMENT_NAME.tick = "axis-tick", AXIS_ELEMENT_NAME.subTick = "axis-sub-tick", AXIS_ELEMENT_NAME.label = "axis-label", AXIS_ELEMENT_NAME.title = "axis-title", AXIS_ELEMENT_NAME.gridContainer = "axis-grid-container", AXIS_ELEMENT_NAME.grid = "axis-grid", AXIS_ELEMENT_NAME.gridRegion = "axis-grid-region", AXIS_ELEMENT_NAME.line = "axis-line", AXIS_ELEMENT_NAME.background = "axis-background", AXIS_ELEMENT_NAME.axisLabelBackground = "axis-label-background", AXIS_ELEMENT_NAME.axisBreak = "axis-break", AXIS_ELEMENT_NAME.axisBreakSymbol = "axis-break-symbol";
|
|
33382
33402
|
}(AXIS_ELEMENT_NAME || (AXIS_ELEMENT_NAME = {}));
|
|
33383
33403
|
var AxisStateValue;
|
|
33384
33404
|
!function (AxisStateValue) {
|
|
@@ -33390,6 +33410,7 @@
|
|
|
33390
33410
|
[AxisStateValue.hover]: {},
|
|
33391
33411
|
[AxisStateValue.hoverReverse]: {}
|
|
33392
33412
|
};
|
|
33413
|
+
const TopZIndex = 999;
|
|
33393
33414
|
|
|
33394
33415
|
const DEFAULT_AXIS_THEME = {
|
|
33395
33416
|
title: {
|
|
@@ -33445,6 +33466,12 @@
|
|
|
33445
33466
|
}
|
|
33446
33467
|
}
|
|
33447
33468
|
};
|
|
33469
|
+
const DEFAULT_AXIS_BREAK_SYMBOL_STYLE = {
|
|
33470
|
+
size: 8,
|
|
33471
|
+
stroke: "#000",
|
|
33472
|
+
lineWidth: 1,
|
|
33473
|
+
zIndex: 1
|
|
33474
|
+
};
|
|
33448
33475
|
|
|
33449
33476
|
const clampRadian = function () {
|
|
33450
33477
|
let angle = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
@@ -33476,6 +33503,20 @@
|
|
|
33476
33503
|
y: baseY - dy
|
|
33477
33504
|
};
|
|
33478
33505
|
}
|
|
33506
|
+
function getAxisBreakSymbolAttrs() {
|
|
33507
|
+
let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
33508
|
+
var _a, _b;
|
|
33509
|
+
const {
|
|
33510
|
+
style = {},
|
|
33511
|
+
angle = .5 * Math.PI
|
|
33512
|
+
} = props,
|
|
33513
|
+
symbolStyle = merge$2({}, DEFAULT_AXIS_BREAK_SYMBOL_STYLE, style),
|
|
33514
|
+
symbolSize = null !== (_a = symbolStyle.size) && void 0 !== _a ? _a : DEFAULT_AXIS_BREAK_SYMBOL_STYLE.size;
|
|
33515
|
+
return Object.assign(Object.assign({}, symbolStyle), {
|
|
33516
|
+
symbolType: null !== (_b = symbolStyle.symbolType) && void 0 !== _b ? _b : `M ${-symbolSize / 2} ${symbolSize * Math.sin(angle)} L ${symbolSize / 2} ${-symbolSize * Math.sin(angle)}`,
|
|
33517
|
+
symbolSize: symbolSize
|
|
33518
|
+
});
|
|
33519
|
+
}
|
|
33479
33520
|
function getElMap(g) {
|
|
33480
33521
|
const elMap = {};
|
|
33481
33522
|
return traverseGroup(g, el => {
|
|
@@ -33878,6 +33919,17 @@
|
|
|
33878
33919
|
function itemIntersect(item1, item2) {
|
|
33879
33920
|
return isRectIntersect(item1.AABBBounds, item2.AABBBounds, !1) && (!item1.rotatedBounds || !item2.rotatedBounds || isRotateAABBIntersect(item1.rotatedBounds, item2.rotatedBounds, !0));
|
|
33880
33921
|
}
|
|
33922
|
+
const DELTA_ANGLE = Math.sin(Math.PI / 10);
|
|
33923
|
+
function isAngleVertical(angle) {
|
|
33924
|
+
const hasAngle = !isNil$1(angle) && 0 !== angle,
|
|
33925
|
+
cos = hasAngle ? Math.cos(angle) : 1;
|
|
33926
|
+
return hasAngle && Math.abs(cos) <= DELTA_ANGLE;
|
|
33927
|
+
}
|
|
33928
|
+
function isAngleHorizontal(angle) {
|
|
33929
|
+
const hasAngle = !isNil$1(angle) && 0 !== angle,
|
|
33930
|
+
sin = hasAngle ? Math.sin(angle) : 0;
|
|
33931
|
+
return !hasAngle || Math.abs(sin) <= DELTA_ANGLE;
|
|
33932
|
+
}
|
|
33881
33933
|
|
|
33882
33934
|
const methods$2 = {
|
|
33883
33935
|
parity: function (items) {
|
|
@@ -34002,6 +34054,18 @@
|
|
|
34002
34054
|
};
|
|
34003
34055
|
}
|
|
34004
34056
|
|
|
34057
|
+
function normalizeOverflowLimitLength(overflowLimitLength) {
|
|
34058
|
+
return isValidNumber$1(overflowLimitLength) ? {
|
|
34059
|
+
left: overflowLimitLength,
|
|
34060
|
+
right: overflowLimitLength
|
|
34061
|
+
} : isObject$2(overflowLimitLength) ? {
|
|
34062
|
+
left: overflowLimitLength.left || 0,
|
|
34063
|
+
right: overflowLimitLength.right || 0
|
|
34064
|
+
} : {
|
|
34065
|
+
left: 0,
|
|
34066
|
+
right: 0
|
|
34067
|
+
};
|
|
34068
|
+
}
|
|
34005
34069
|
function autoLimit(labels, config) {
|
|
34006
34070
|
const {
|
|
34007
34071
|
limitLength: limitLength,
|
|
@@ -34011,15 +34075,15 @@
|
|
|
34011
34075
|
axisLength: axisLength
|
|
34012
34076
|
} = config;
|
|
34013
34077
|
if (isEmpty(labels) || !isValidNumber$1(limitLength)) return;
|
|
34014
|
-
const
|
|
34078
|
+
const overflowLimitLength = normalizeOverflowLimitLength(config.overflowLimitLength);
|
|
34015
34079
|
labels.forEach(label => {
|
|
34016
34080
|
var _a;
|
|
34017
34081
|
const angle = label.attribute.angle,
|
|
34018
34082
|
hasAngle = !isNil$1(angle),
|
|
34019
34083
|
cos = hasAngle ? Math.cos(angle) : 1,
|
|
34020
34084
|
sin = hasAngle ? Math.sin(angle) : 0,
|
|
34021
|
-
isHorizontal =
|
|
34022
|
-
isVertical =
|
|
34085
|
+
isHorizontal = isAngleHorizontal(angle),
|
|
34086
|
+
isVertical = isAngleVertical(angle),
|
|
34023
34087
|
isX = "top" === orient || "bottom" === orient;
|
|
34024
34088
|
if (isX) {
|
|
34025
34089
|
if (isVertical && Math.floor(label.AABBBounds.height()) <= limitLength) return;
|
|
@@ -34039,8 +34103,15 @@
|
|
|
34039
34103
|
x1: x1,
|
|
34040
34104
|
x2: x2
|
|
34041
34105
|
} = label.AABBBounds,
|
|
34042
|
-
tan = sin / cos
|
|
34043
|
-
|
|
34106
|
+
tan = sin / cos,
|
|
34107
|
+
verticalSizeLimit = Math.abs(limitLength / sin);
|
|
34108
|
+
if (tan > 0 && x1 <= axisLength && limitLength / tan + x1 > axisLength) {
|
|
34109
|
+
const lengthLimit = (axisLength - x1) / Math.abs(cos) + overflowLimitLength.right;
|
|
34110
|
+
limitLabelLength = Math.min(lengthLimit, verticalSizeLimit);
|
|
34111
|
+
} else if (tan < 0 && x2 >= 0 && limitLength / tan + x2 < 0) {
|
|
34112
|
+
const lengthLimit = x2 / Math.abs(cos) + overflowLimitLength.left;
|
|
34113
|
+
limitLabelLength = Math.min(lengthLimit, verticalSizeLimit);
|
|
34114
|
+
} else limitLabelLength = verticalSizeLimit;
|
|
34044
34115
|
} else limitLabelLength = Math.abs(limitLength / cos);
|
|
34045
34116
|
isValidNumber$1(label.attribute.maxLineWidth) && (limitLabelLength = isValidNumber$1(limitLabelLength) ? Math.min(label.attribute.maxLineWidth, limitLabelLength) : label.attribute.maxLineWidth), label.setAttributes({
|
|
34046
34117
|
maxLineWidth: limitLabelLength,
|
|
@@ -34049,6 +34120,39 @@
|
|
|
34049
34120
|
});
|
|
34050
34121
|
}
|
|
34051
34122
|
|
|
34123
|
+
function autoWrap(labels, config) {
|
|
34124
|
+
const {
|
|
34125
|
+
limitLength: limitLength,
|
|
34126
|
+
axisLength: axisLength,
|
|
34127
|
+
ellipsis = "...",
|
|
34128
|
+
orient: orient
|
|
34129
|
+
} = config;
|
|
34130
|
+
if (isEmpty(labels) || !isValidNumber$1(limitLength)) return;
|
|
34131
|
+
const verticalLimitLength = axisLength / labels.length;
|
|
34132
|
+
labels.forEach(label => {
|
|
34133
|
+
var _a;
|
|
34134
|
+
const angle = label.attribute.angle,
|
|
34135
|
+
isHorizontal = isAngleHorizontal(angle),
|
|
34136
|
+
isVertical = isAngleVertical(angle),
|
|
34137
|
+
isX = "top" === orient || "bottom" === orient;
|
|
34138
|
+
if (isX) {
|
|
34139
|
+
if (isVertical && Math.floor(label.AABBBounds.height()) <= limitLength) return;
|
|
34140
|
+
if (isHorizontal && Math.floor(label.AABBBounds.width()) <= verticalLimitLength) return;
|
|
34141
|
+
} else {
|
|
34142
|
+
if (isVertical && Math.floor(label.AABBBounds.height()) <= verticalLimitLength) return;
|
|
34143
|
+
if (isHorizontal && Math.floor(label.AABBBounds.width()) <= limitLength) return;
|
|
34144
|
+
}
|
|
34145
|
+
let limitLabelLength = null,
|
|
34146
|
+
heightLimit = null;
|
|
34147
|
+
isX ? isVertical ? (limitLabelLength = limitLength, heightLimit = verticalLimitLength) : (limitLabelLength = verticalLimitLength, heightLimit = limitLength) : isVertical ? (limitLabelLength = verticalLimitLength, heightLimit = limitLength) : (limitLabelLength = limitLength, heightLimit = verticalLimitLength), label.setAttributes({
|
|
34148
|
+
maxLineWidth: limitLabelLength,
|
|
34149
|
+
ellipsis: null !== (_a = label.attribute.ellipsis) && void 0 !== _a ? _a : ellipsis,
|
|
34150
|
+
whiteSpace: "normal",
|
|
34151
|
+
heightLimit: heightLimit
|
|
34152
|
+
});
|
|
34153
|
+
});
|
|
34154
|
+
}
|
|
34155
|
+
|
|
34052
34156
|
function alignAxisLabels(labels, start, containerSize, orient, align) {
|
|
34053
34157
|
"left" === orient || "right" === orient ? "left" === align ? labels.forEach(label => {
|
|
34054
34158
|
var _a;
|
|
@@ -34148,7 +34252,50 @@
|
|
|
34148
34252
|
}
|
|
34149
34253
|
_renderInner(container) {
|
|
34150
34254
|
var _a;
|
|
34151
|
-
|
|
34255
|
+
if (this._breaks = null, this.attribute.breaks && this.attribute.breaks.length) {
|
|
34256
|
+
const transformedBreaks = [];
|
|
34257
|
+
for (let index = 0; index < this.attribute.breaks.length; index++) {
|
|
34258
|
+
const aBreak = this.attribute.breaks[index],
|
|
34259
|
+
{
|
|
34260
|
+
range: range,
|
|
34261
|
+
breakSymbol: breakSymbol,
|
|
34262
|
+
rawRange: rawRange
|
|
34263
|
+
} = aBreak;
|
|
34264
|
+
transformedBreaks.push({
|
|
34265
|
+
startPoint: this.getTickCoord(range[0]),
|
|
34266
|
+
endPoint: this.getTickCoord(range[1]),
|
|
34267
|
+
range: range,
|
|
34268
|
+
breakSymbol: breakSymbol,
|
|
34269
|
+
rawRange: rawRange
|
|
34270
|
+
});
|
|
34271
|
+
}
|
|
34272
|
+
this._breaks = transformedBreaks;
|
|
34273
|
+
}
|
|
34274
|
+
super._renderInner(container), this._breaks && this._breaks.length && this._breaks.forEach((b, index) => {
|
|
34275
|
+
const {
|
|
34276
|
+
startPoint: startPoint,
|
|
34277
|
+
endPoint: endPoint,
|
|
34278
|
+
breakSymbol: breakSymbol,
|
|
34279
|
+
rawRange: rawRange
|
|
34280
|
+
} = b;
|
|
34281
|
+
if (!1 !== (null == breakSymbol ? void 0 : breakSymbol.visible)) {
|
|
34282
|
+
const axisBreakGroup = graphicCreator.group({
|
|
34283
|
+
zIndex: TopZIndex
|
|
34284
|
+
});
|
|
34285
|
+
axisBreakGroup.name = AXIS_ELEMENT_NAME.axisBreak, axisBreakGroup.id = this._getNodeId(`${AXIS_ELEMENT_NAME.axisBreak}-${index}`), axisBreakGroup.data = rawRange;
|
|
34286
|
+
const symbolStyle = getAxisBreakSymbolAttrs(breakSymbol),
|
|
34287
|
+
shape1 = graphicCreator.symbol(Object.assign({
|
|
34288
|
+
x: startPoint.x,
|
|
34289
|
+
y: startPoint.y
|
|
34290
|
+
}, symbolStyle));
|
|
34291
|
+
shape1.name = AXIS_ELEMENT_NAME.axisBreakSymbol;
|
|
34292
|
+
const shape2 = graphicCreator.symbol(Object.assign({
|
|
34293
|
+
x: endPoint.x,
|
|
34294
|
+
y: endPoint.y
|
|
34295
|
+
}, symbolStyle));
|
|
34296
|
+
shape2.name = AXIS_ELEMENT_NAME.axisBreakSymbol, axisBreakGroup.add(shape1), axisBreakGroup.add(shape2), container.add(axisBreakGroup);
|
|
34297
|
+
}
|
|
34298
|
+
});
|
|
34152
34299
|
const {
|
|
34153
34300
|
panel: panel
|
|
34154
34301
|
} = this.attribute;
|
|
@@ -34175,18 +34322,25 @@
|
|
|
34175
34322
|
startSymbol: startSymbol,
|
|
34176
34323
|
endSymbol: endSymbol,
|
|
34177
34324
|
style: style,
|
|
34178
|
-
breakRange: breakRange,
|
|
34179
|
-
breakShape: breakShape,
|
|
34180
|
-
breakShapeStyle: breakShapeStyle,
|
|
34181
34325
|
state: state
|
|
34182
34326
|
} = _a,
|
|
34183
|
-
restLineAttrs = __rest$5(_a, ["startSymbol", "endSymbol", "style", "
|
|
34327
|
+
restLineAttrs = __rest$5(_a, ["startSymbol", "endSymbol", "style", "state"]),
|
|
34184
34328
|
lineAttrs = Object.assign({
|
|
34185
|
-
points: [start, end],
|
|
34186
34329
|
startSymbol: startSymbol,
|
|
34187
34330
|
endSymbol: endSymbol,
|
|
34188
34331
|
lineStyle: style
|
|
34189
34332
|
}, restLineAttrs);
|
|
34333
|
+
if (this._breaks && this._breaks.length) {
|
|
34334
|
+
const linePoints = [];
|
|
34335
|
+
let lastStartPoint = start;
|
|
34336
|
+
this._breaks.forEach(b => {
|
|
34337
|
+
const {
|
|
34338
|
+
startPoint: startPoint,
|
|
34339
|
+
endPoint: endPoint
|
|
34340
|
+
} = b;
|
|
34341
|
+
linePoints.push([lastStartPoint, startPoint]), lastStartPoint = endPoint;
|
|
34342
|
+
}), linePoints.push([lastStartPoint, end]), lineAttrs.points = linePoints, lineAttrs.multiSegment = !0;
|
|
34343
|
+
} else lineAttrs.points = [start, end];
|
|
34190
34344
|
isEmpty(state) || (lineAttrs.state = {
|
|
34191
34345
|
line: merge$2({}, DEFAULT_STATES$1, state),
|
|
34192
34346
|
symbol: merge$2({}, DEFAULT_STATES$1, state)
|
|
@@ -34392,13 +34546,24 @@
|
|
|
34392
34546
|
autoHide: autoHide$1,
|
|
34393
34547
|
autoHideMethod: autoHideMethod,
|
|
34394
34548
|
autoHideSeparation: autoHideSeparation,
|
|
34395
|
-
lastVisible: lastVisible
|
|
34549
|
+
lastVisible: lastVisible,
|
|
34550
|
+
autoWrap: autoWrap$1,
|
|
34551
|
+
overflowLimitLength: overflowLimitLength
|
|
34396
34552
|
} = label;
|
|
34397
34553
|
if (isFunction$1(layoutFunc)) layoutFunc(labelShapes, labelData, layer, this);else {
|
|
34398
|
-
if (autoRotate$1
|
|
34554
|
+
if (autoRotate$1) autoRotate(labelShapes, {
|
|
34399
34555
|
labelRotateAngle: autoRotateAngle,
|
|
34400
34556
|
orient: orient
|
|
34401
|
-
})
|
|
34557
|
+
});else if (autoWrap$1) {
|
|
34558
|
+
const axisLength = "left" === orient || "right" === orient ? Math.abs(this.attribute.start.y - this.attribute.end.y) : Math.abs(this.attribute.start.x - this.attribute.end.x);
|
|
34559
|
+
autoWrap(labelShapes, {
|
|
34560
|
+
orient: orient,
|
|
34561
|
+
limitLength: limitLength,
|
|
34562
|
+
axisLength: axisLength,
|
|
34563
|
+
ellipsis: limitEllipsis
|
|
34564
|
+
});
|
|
34565
|
+
}
|
|
34566
|
+
if (!autoWrap$1 && autoLimit$1 && isValidNumber$1(limitLength) && limitLength > 0) {
|
|
34402
34567
|
const isVertical = "left" === orient || "right" === orient,
|
|
34403
34568
|
axisLength = isVertical ? Math.abs(this.attribute.start.y - this.attribute.end.y) : Math.abs(this.attribute.start.x - this.attribute.end.x),
|
|
34404
34569
|
verticalLimitLength = isVertical ? axisLength / labelShapes.length : autoHide$1 || autoRotate$1 ? 1 / 0 : axisLength / labelShapes.length;
|
|
@@ -34407,7 +34572,8 @@
|
|
|
34407
34572
|
verticalLimitLength: verticalLimitLength,
|
|
34408
34573
|
ellipsis: limitEllipsis,
|
|
34409
34574
|
orient: orient,
|
|
34410
|
-
axisLength: axisLength
|
|
34575
|
+
axisLength: axisLength,
|
|
34576
|
+
overflowLimitLength: overflowLimitLength
|
|
34411
34577
|
});
|
|
34412
34578
|
}
|
|
34413
34579
|
autoHide$1 && autoHide(labelShapes, {
|
|
@@ -34468,6 +34634,9 @@
|
|
|
34468
34634
|
}
|
|
34469
34635
|
return limitLength && (limitLength = (limitLength - labelSpace - titleSpacing - titleHeight - axisLineWidth - tickLength) / layerCount), limitLength;
|
|
34470
34636
|
}
|
|
34637
|
+
release() {
|
|
34638
|
+
super.release(), this._breaks = null;
|
|
34639
|
+
}
|
|
34471
34640
|
}
|
|
34472
34641
|
LineAxis.defaultAttributes = DEFAULT_AXIS_THEME, mixin(LineAxis, LineAxisMixin);
|
|
34473
34642
|
|
|
@@ -35789,7 +35958,28 @@
|
|
|
35789
35958
|
}
|
|
35790
35959
|
}
|
|
35791
35960
|
|
|
35961
|
+
function getScaleTicks(op, scale, count, getTicks) {
|
|
35962
|
+
let scaleTicks;
|
|
35963
|
+
const {
|
|
35964
|
+
breakData: breakData
|
|
35965
|
+
} = op;
|
|
35966
|
+
if (breakData && breakData()) {
|
|
35967
|
+
const {
|
|
35968
|
+
breakDomains: breakDomains
|
|
35969
|
+
} = breakData(),
|
|
35970
|
+
domain = scale.domain();
|
|
35971
|
+
scaleTicks = [];
|
|
35972
|
+
for (let i = 0; i < domain.length - 1; i++) {
|
|
35973
|
+
getTicks(count, [domain[i], domain[i + 1]]).forEach(tick => {
|
|
35974
|
+
breakDomains.some(breakDomain => tick >= breakDomain[0] && tick <= breakDomain[1]) || scaleTicks.push(tick);
|
|
35975
|
+
});
|
|
35976
|
+
}
|
|
35977
|
+
scale.domain(domain);
|
|
35978
|
+
} else scaleTicks = getTicks(count);
|
|
35979
|
+
return scaleTicks;
|
|
35980
|
+
}
|
|
35792
35981
|
const continuousTicks = (scale, op) => {
|
|
35982
|
+
var _a, _b;
|
|
35793
35983
|
if (!isContinuous(scale.type)) return convertDomainToTickData(scale.domain());
|
|
35794
35984
|
const range = scale.range(),
|
|
35795
35985
|
rangeSize = Math.abs(range[range.length - 1] - range[0]);
|
|
@@ -35799,27 +35989,33 @@
|
|
|
35799
35989
|
forceTickCount: forceTickCount,
|
|
35800
35990
|
tickStep: tickStep,
|
|
35801
35991
|
noDecimals = !1,
|
|
35802
|
-
labelStyle: labelStyle
|
|
35992
|
+
labelStyle: labelStyle,
|
|
35993
|
+
breakData: breakData
|
|
35803
35994
|
} = op;
|
|
35804
35995
|
let scaleTicks;
|
|
35805
|
-
if (isValid$1(tickStep)) scaleTicks = scale.stepTicks(tickStep);else if (isValid$1(forceTickCount)) scaleTicks = scale.forceTicks(
|
|
35806
|
-
const count = isFunction$1(tickCount) ? tickCount({
|
|
35996
|
+
if (isValid$1(tickStep)) scaleTicks = scale.stepTicks(tickStep);else if (isValid$1(forceTickCount)) scaleTicks = getScaleTicks(op, scale, forceTickCount, (count, subDomain) => subDomain && subDomain.length ? scale.domain(subDomain, !0).forceTicks(count) : scale.forceTicks(count));else if ("d3" === op.tickMode) {
|
|
35997
|
+
const count = null !== (_a = isFunction$1(tickCount) ? tickCount({
|
|
35807
35998
|
axisLength: rangeSize,
|
|
35808
35999
|
labelStyle: labelStyle
|
|
35809
|
-
}) : tickCount;
|
|
35810
|
-
scaleTicks =
|
|
36000
|
+
}) : tickCount) && void 0 !== _a ? _a : 5;
|
|
36001
|
+
scaleTicks = getScaleTicks(op, scale, count, (count, subDomain) => subDomain && subDomain.length ? scale.domain(subDomain, !0).d3Ticks(count, {
|
|
35811
36002
|
noDecimals: noDecimals
|
|
35812
|
-
})
|
|
36003
|
+
}) : scale.d3Ticks(count, {
|
|
36004
|
+
noDecimals: noDecimals
|
|
36005
|
+
}));
|
|
35813
36006
|
} else {
|
|
35814
|
-
const count = isFunction$1(tickCount) ? tickCount({
|
|
36007
|
+
const count = null !== (_b = isFunction$1(tickCount) ? tickCount({
|
|
35815
36008
|
axisLength: rangeSize,
|
|
35816
36009
|
labelStyle: labelStyle
|
|
35817
|
-
}) : tickCount,
|
|
36010
|
+
}) : tickCount) && void 0 !== _b ? _b : 5,
|
|
35818
36011
|
customTicks = isFunction$1(op.tickMode) ? op.tickMode : void 0;
|
|
35819
|
-
scaleTicks =
|
|
36012
|
+
scaleTicks = getScaleTicks(op, scale, count, (count, subDomain) => subDomain && subDomain.length ? scale.domain(subDomain, !0).ticks(count, {
|
|
35820
36013
|
noDecimals: noDecimals,
|
|
35821
36014
|
customTicks: customTicks
|
|
35822
|
-
})
|
|
36015
|
+
}) : scale.ticks(count, {
|
|
36016
|
+
noDecimals: noDecimals,
|
|
36017
|
+
customTicks: customTicks
|
|
36018
|
+
}));
|
|
35823
36019
|
}
|
|
35824
36020
|
if (op.sampling && ("cartesian" === op.coordinateType || "polar" === op.coordinateType && "radius" === op.axisOrientType)) {
|
|
35825
36021
|
const {
|
|
@@ -35830,7 +36026,8 @@
|
|
|
35830
36026
|
AABBBounds: bounds,
|
|
35831
36027
|
value: scaleTicks[i]
|
|
35832
36028
|
}));
|
|
35833
|
-
|
|
36029
|
+
const samplingMethod = breakData && breakData() ? methods$1.greedy : methods$1.parity;
|
|
36030
|
+
for (; items.length >= 3 && hasOverlap$1(items, labelGap);) items = samplingMethod(items, labelGap);
|
|
35834
36031
|
const ticks = items.map(item => item.value);
|
|
35835
36032
|
ticks.length < 3 && labelFlush && (ticks.length > 1 && ticks.pop(), last(ticks) !== last(scaleTicks) && ticks.push(last(scaleTicks))), scaleTicks = ticks;
|
|
35836
36033
|
}
|
|
@@ -40920,7 +41117,7 @@
|
|
|
40920
41117
|
super((null == options ? void 0 : options.skipDefault) ? attributes : merge$2({}, Title.defaultAttributes, attributes)), this.name = "title";
|
|
40921
41118
|
}
|
|
40922
41119
|
render() {
|
|
40923
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t
|
|
41120
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t;
|
|
40924
41121
|
const {
|
|
40925
41122
|
textType: textType,
|
|
40926
41123
|
text: text,
|
|
@@ -40944,96 +41141,124 @@
|
|
|
40944
41141
|
y: parsedPadding[0],
|
|
40945
41142
|
zIndex: 1
|
|
40946
41143
|
}, "group");
|
|
40947
|
-
if (!1 !== this.attribute.visible && !1 !== textStyle.visible)
|
|
40948
|
-
const
|
|
40949
|
-
|
|
40950
|
-
|
|
40951
|
-
|
|
40952
|
-
|
|
40953
|
-
|
|
40954
|
-
|
|
40955
|
-
|
|
40956
|
-
|
|
40957
|
-
|
|
40958
|
-
|
|
40959
|
-
|
|
40960
|
-
|
|
40961
|
-
|
|
40962
|
-
|
|
40963
|
-
|
|
40964
|
-
|
|
40965
|
-
|
|
40966
|
-
|
|
40967
|
-
|
|
40968
|
-
|
|
40969
|
-
|
|
40970
|
-
|
|
40971
|
-
|
|
40972
|
-
|
|
40973
|
-
|
|
40974
|
-
|
|
40975
|
-
|
|
40976
|
-
|
|
40977
|
-
|
|
40978
|
-
|
|
40979
|
-
|
|
40980
|
-
|
|
40981
|
-
|
|
40982
|
-
|
|
40983
|
-
|
|
40984
|
-
|
|
40985
|
-
|
|
40986
|
-
|
|
41144
|
+
if (!1 !== this.attribute.visible && !1 !== textStyle.visible) {
|
|
41145
|
+
const {
|
|
41146
|
+
width: mainTitleWidth,
|
|
41147
|
+
height: mainTitleHeight,
|
|
41148
|
+
maxHeight: mainTitleMaxHeight,
|
|
41149
|
+
maxWidth: mainTitleMaxWidth,
|
|
41150
|
+
x = 0,
|
|
41151
|
+
y = 0,
|
|
41152
|
+
ellipsis = !0,
|
|
41153
|
+
wordBreak = "break-word",
|
|
41154
|
+
maxWidth: maxWidth,
|
|
41155
|
+
lineClamp: lineClamp
|
|
41156
|
+
} = textStyle;
|
|
41157
|
+
if ("rich" === textType || isValid$1(textStyle.character)) {
|
|
41158
|
+
const attr = Object.assign({
|
|
41159
|
+
x: x,
|
|
41160
|
+
y: y,
|
|
41161
|
+
width: null !== (_a = null != mainTitleWidth ? mainTitleWidth : width) && void 0 !== _a ? _a : 0,
|
|
41162
|
+
height: null !== (_b = null != mainTitleHeight ? mainTitleHeight : height) && void 0 !== _b ? _b : 0,
|
|
41163
|
+
ellipsis: null == ellipsis || ellipsis,
|
|
41164
|
+
wordBreak: null != wordBreak ? wordBreak : "break-word",
|
|
41165
|
+
maxHeight: null != mainTitleMaxHeight ? mainTitleMaxHeight : maxHeight,
|
|
41166
|
+
maxWidth: null != mainTitleMaxWidth ? mainTitleMaxWidth : maxWidth,
|
|
41167
|
+
textConfig: null !== (_c = textStyle.character) && void 0 !== _c ? _c : text
|
|
41168
|
+
}, textStyle);
|
|
41169
|
+
this._mainTitle = group.createOrUpdateChild("mainTitle", attr, "richtext");
|
|
41170
|
+
} else if ("html" === textType) {
|
|
41171
|
+
const attr = Object.assign({
|
|
41172
|
+
html: Object.assign(Object.assign({
|
|
41173
|
+
dom: text
|
|
41174
|
+
}, DEFAULT_HTML_TEXT_SPEC), textStyle),
|
|
41175
|
+
x: x,
|
|
41176
|
+
y: y,
|
|
41177
|
+
width: null !== (_d = null != mainTitleWidth ? mainTitleWidth : width) && void 0 !== _d ? _d : 0,
|
|
41178
|
+
height: null !== (_e = null != mainTitleHeight ? mainTitleHeight : height) && void 0 !== _e ? _e : 0,
|
|
41179
|
+
ellipsis: ellipsis,
|
|
41180
|
+
wordBreak: wordBreak,
|
|
41181
|
+
maxHeight: null != mainTitleMaxHeight ? mainTitleMaxHeight : maxHeight,
|
|
41182
|
+
maxWidth: null != mainTitleMaxWidth ? mainTitleMaxWidth : maxWidth,
|
|
41183
|
+
textConfig: []
|
|
41184
|
+
}, textStyle);
|
|
41185
|
+
this._mainTitle = group.createOrUpdateChild("mainTitle", attr, "richtext");
|
|
41186
|
+
} else isValid$1(text) && (this._mainTitle = group.createOrUpdateChild("mainTitle", Object.assign(Object.assign({
|
|
41187
|
+
text: isArray$1(text) ? text : [text],
|
|
41188
|
+
whiteSpace: "normal"
|
|
41189
|
+
}, textStyle), {
|
|
41190
|
+
maxLineWidth: null !== (_g = null !== (_f = textStyle.maxLineWidth) && void 0 !== _f ? _f : mainTitleWidth) && void 0 !== _g ? _g : width,
|
|
41191
|
+
heightLimit: null != mainTitleHeight ? mainTitleHeight : maxHeight,
|
|
41192
|
+
lineClamp: lineClamp,
|
|
41193
|
+
ellipsis: ellipsis,
|
|
41194
|
+
x: x,
|
|
41195
|
+
y: y
|
|
41196
|
+
}), "text"));
|
|
41197
|
+
}
|
|
40987
41198
|
const maintextHeight = this._mainTitle ? this._mainTitle.AABBBounds.height() : 0,
|
|
40988
41199
|
maintextWidth = this._mainTitle ? this._mainTitle.AABBBounds.width() : 0;
|
|
40989
|
-
if (!1 !== this.attribute.visible && !1 !== subtextStyle.visible)
|
|
40990
|
-
const
|
|
40991
|
-
|
|
40992
|
-
|
|
40993
|
-
|
|
40994
|
-
|
|
40995
|
-
|
|
40996
|
-
|
|
40997
|
-
|
|
40998
|
-
|
|
40999
|
-
|
|
41000
|
-
|
|
41001
|
-
|
|
41002
|
-
|
|
41003
|
-
|
|
41004
|
-
|
|
41005
|
-
|
|
41006
|
-
|
|
41007
|
-
|
|
41008
|
-
|
|
41009
|
-
|
|
41010
|
-
|
|
41011
|
-
|
|
41012
|
-
|
|
41013
|
-
|
|
41014
|
-
|
|
41015
|
-
|
|
41016
|
-
|
|
41017
|
-
|
|
41018
|
-
|
|
41019
|
-
|
|
41020
|
-
|
|
41021
|
-
|
|
41022
|
-
|
|
41023
|
-
|
|
41024
|
-
|
|
41025
|
-
|
|
41026
|
-
|
|
41027
|
-
|
|
41028
|
-
|
|
41200
|
+
if (!1 !== this.attribute.visible && !1 !== subtextStyle.visible) {
|
|
41201
|
+
const {
|
|
41202
|
+
width: subTitleWidth,
|
|
41203
|
+
height: subTitleHeight,
|
|
41204
|
+
maxWidth: subTitleMaxWidth,
|
|
41205
|
+
maxHeight: subTitleMaxHeight,
|
|
41206
|
+
x = 0,
|
|
41207
|
+
y = 0,
|
|
41208
|
+
ellipsis = !0,
|
|
41209
|
+
wordBreak = "break-word",
|
|
41210
|
+
lineClamp: lineClamp
|
|
41211
|
+
} = subtextStyle,
|
|
41212
|
+
maxSubTextHeight = Math.max(Number.MIN_VALUE, maxHeight - maintextHeight);
|
|
41213
|
+
if ("rich" === subtextType || isValid$1(subtextStyle.character)) {
|
|
41214
|
+
const attr = Object.assign({
|
|
41215
|
+
x: x,
|
|
41216
|
+
y: y,
|
|
41217
|
+
width: null !== (_h = null != subTitleWidth ? subTitleWidth : width) && void 0 !== _h ? _h : 0,
|
|
41218
|
+
height: null !== (_j = null != subTitleHeight ? subTitleHeight : height) && void 0 !== _j ? _j : 0,
|
|
41219
|
+
ellipsis: ellipsis,
|
|
41220
|
+
wordBreak: wordBreak,
|
|
41221
|
+
maxHeight: null != subTitleMaxHeight ? subTitleMaxHeight : maxSubTextHeight,
|
|
41222
|
+
maxWidth: null != subTitleMaxWidth ? subTitleMaxWidth : maxWidth,
|
|
41223
|
+
textConfig: null !== (_k = subtextStyle.character) && void 0 !== _k ? _k : subtext
|
|
41224
|
+
}, subtextStyle);
|
|
41225
|
+
this._subTitle = group.createOrUpdateChild("subTitle", attr, "richtext");
|
|
41226
|
+
} else if ("html" === subtextType) {
|
|
41227
|
+
const attr = Object.assign({
|
|
41228
|
+
html: Object.assign(Object.assign({
|
|
41229
|
+
dom: subtext
|
|
41230
|
+
}, DEFAULT_HTML_TEXT_SPEC), subtextStyle),
|
|
41231
|
+
x: x,
|
|
41232
|
+
y: y,
|
|
41233
|
+
width: null !== (_l = null != subTitleWidth ? subTitleWidth : width) && void 0 !== _l ? _l : 0,
|
|
41234
|
+
height: null !== (_m = null != subTitleHeight ? subTitleHeight : height) && void 0 !== _m ? _m : 0,
|
|
41235
|
+
ellipsis: ellipsis,
|
|
41236
|
+
wordBreak: wordBreak,
|
|
41237
|
+
maxHeight: null != subTitleMaxHeight ? subTitleMaxHeight : maxSubTextHeight,
|
|
41238
|
+
maxWidth: null != subTitleMaxWidth ? subTitleMaxWidth : maxWidth,
|
|
41239
|
+
textConfig: []
|
|
41240
|
+
}, subtextStyle);
|
|
41241
|
+
this._subTitle = group.createOrUpdateChild("subTitle", attr, "richtext");
|
|
41242
|
+
} else isValid$1(subtext) && (this._subTitle = group.createOrUpdateChild("subTitle", Object.assign(Object.assign({
|
|
41243
|
+
text: isArray$1(subtext) ? subtext : [subtext],
|
|
41244
|
+
whiteSpace: "normal"
|
|
41245
|
+
}, subtextStyle), {
|
|
41246
|
+
maxLineWidth: null !== (_o = subtextStyle.maxLineWidth) && void 0 !== _o ? _o : width,
|
|
41247
|
+
heightLimit: null !== (_p = subtextStyle.heightLimit) && void 0 !== _p ? _p : maxSubTextHeight,
|
|
41248
|
+
lineClamp: lineClamp,
|
|
41249
|
+
ellipsis: ellipsis,
|
|
41250
|
+
x: 0,
|
|
41251
|
+
y: maintextHeight
|
|
41252
|
+
}), "text"));
|
|
41253
|
+
}
|
|
41029
41254
|
const subtextHeight = this._subTitle ? this._subTitle.AABBBounds.height() : 0,
|
|
41030
41255
|
subtextWidth = this._subTitle ? this._subTitle.AABBBounds.width() : 0;
|
|
41031
41256
|
let titleWidth = Math.max(maintextWidth, subtextWidth),
|
|
41032
|
-
titleHeight = maintextHeight + (null !== (
|
|
41033
|
-
if (isValid$1(width) && (titleWidth = width
|
|
41257
|
+
titleHeight = maintextHeight + (null !== (_q = subtextStyle.height) && void 0 !== _q ? _q : subtextHeight);
|
|
41258
|
+
if (isValid$1(width) && (titleWidth = width), isValid$1(height) && (titleHeight = height), isValid$1(minWidth) && titleWidth < minWidth && (titleWidth = minWidth), isValid$1(maxWidth) && titleWidth > maxWidth && (titleWidth = maxWidth), isValid$1(minHeight) && titleHeight < minHeight && (titleHeight = minHeight), isValid$1(maxHeight) && titleHeight > maxHeight && (titleHeight = maxHeight), group.attribute.width = titleWidth, group.attribute.height = titleHeight, group.attribute.boundsPadding = parsedPadding, this._mainTitle) {
|
|
41034
41259
|
if (isValid$1(align) || isValid$1(textStyle.align)) {
|
|
41035
41260
|
const mainTitleAlign = textStyle.align ? textStyle.align : align,
|
|
41036
|
-
mainTitleWidth = null !== (
|
|
41261
|
+
mainTitleWidth = null !== (_r = textStyle.width) && void 0 !== _r ? _r : maintextWidth;
|
|
41037
41262
|
"left" === mainTitleAlign ? (this._mainTitle.setAttribute("x", 0), this._mainTitle.setAttribute("textAlign", "left")) : "center" === mainTitleAlign ? (this._mainTitle.setAttribute("x", mainTitleWidth / 2), this._mainTitle.setAttribute("textAlign", "center")) : "right" === mainTitleAlign && (this._mainTitle.setAttribute("x", mainTitleWidth), this._mainTitle.setAttribute("textAlign", "right"));
|
|
41038
41263
|
}
|
|
41039
41264
|
if (isValid$1(verticalAlign) || isValid$1(textStyle.verticalAlign)) {
|
|
@@ -41045,13 +41270,13 @@
|
|
|
41045
41270
|
if (this._subTitle) {
|
|
41046
41271
|
if (isValid$1(align) || isValid$1(subtextStyle.align)) {
|
|
41047
41272
|
const subTitleAlign = subtextStyle.align ? subtextStyle.align : align,
|
|
41048
|
-
subTitleWidth = null !== (
|
|
41273
|
+
subTitleWidth = null !== (_s = subtextStyle.width) && void 0 !== _s ? _s : subtextWidth;
|
|
41049
41274
|
"left" === subTitleAlign ? (this._subTitle.setAttribute("x", 0), this._subTitle.setAttribute("textAlign", "left")) : "center" === subTitleAlign ? (this._subTitle.setAttribute("x", subTitleWidth / 2), this._subTitle.setAttribute("textAlign", "center")) : "right" === subTitleAlign && (this._subTitle.setAttribute("x", subTitleWidth), this._subTitle.setAttribute("textAlign", "right"));
|
|
41050
41275
|
}
|
|
41051
41276
|
if (isValid$1(verticalAlign) || isValid$1(textStyle.verticalAlign)) {
|
|
41052
41277
|
const subTitleVerticalAlign = subtextStyle.verticalAlign ? subtextStyle.verticalAlign : verticalAlign,
|
|
41053
41278
|
subTitleYStart = maintextHeight,
|
|
41054
|
-
subTitleHeight = null !== (
|
|
41279
|
+
subTitleHeight = null !== (_t = subtextStyle.height) && void 0 !== _t ? _t : 0;
|
|
41055
41280
|
"top" === subTitleVerticalAlign ? (this._subTitle.setAttribute("y", subTitleYStart), this._subTitle.setAttribute("textBaseline", "top")) : "middle" === subTitleVerticalAlign ? (this._subTitle.setAttribute("y", subTitleYStart + subTitleHeight / 2), this._subTitle.setAttribute("textBaseline", "middle")) : "bottom" === subTitleVerticalAlign && (this._subTitle.setAttribute("y", subTitleYStart + subTitleHeight), this._subTitle.setAttribute("textBaseline", "bottom"));
|
|
41056
41281
|
}
|
|
41057
41282
|
}
|
|
@@ -50421,9 +50646,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
50421
50646
|
};
|
|
50422
50647
|
markNodes.forEach(node => {
|
|
50423
50648
|
const mark = node.mark;
|
|
50424
|
-
mark.animate && 0
|
|
50649
|
+
mark.animate && 0 !== mark.animate.getAnimatorCount() ? mark.addEventListener("animationEnd", () => {
|
|
50425
50650
|
mark.animate && 0 === mark.animate.getAnimatorCount() && releaseUp(node);
|
|
50426
|
-
});
|
|
50651
|
+
}) : releaseUp(node);
|
|
50427
50652
|
}), this._cachedGrammars.clear();
|
|
50428
50653
|
}
|
|
50429
50654
|
runAfter(callback) {
|
|
@@ -56283,6 +56508,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56283
56508
|
}
|
|
56284
56509
|
}
|
|
56285
56510
|
}
|
|
56511
|
+
clearAllEventElement() {
|
|
56512
|
+
if (this._disableTriggerEvent) {
|
|
56513
|
+
return;
|
|
56514
|
+
}
|
|
56515
|
+
for (const [stateValue, elements] of this._stateElements) {
|
|
56516
|
+
elements.forEach(e => {
|
|
56517
|
+
e.clearStates();
|
|
56518
|
+
});
|
|
56519
|
+
this._stateElements.set(stateValue, []);
|
|
56520
|
+
}
|
|
56521
|
+
}
|
|
56286
56522
|
reverseEventElement(stateValue) {
|
|
56287
56523
|
if (this._disableTriggerEvent) {
|
|
56288
56524
|
return;
|
|
@@ -56337,12 +56573,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
56337
56573
|
});
|
|
56338
56574
|
}
|
|
56339
56575
|
}
|
|
56576
|
+
resetAllInteraction() {
|
|
56577
|
+
for (const [stateValue, interactions] of this._vgrammarInteractions) {
|
|
56578
|
+
if (interactions) {
|
|
56579
|
+
interactions.forEach(vgInteraction => {
|
|
56580
|
+
vgInteraction.reset(null);
|
|
56581
|
+
});
|
|
56582
|
+
}
|
|
56583
|
+
}
|
|
56584
|
+
}
|
|
56340
56585
|
}
|
|
56341
56586
|
|
|
56342
56587
|
const USER_LAYOUT_RECT_LEVEL = 9;
|
|
56343
56588
|
const DEFAULT_LAYOUT_RECT_LEVEL = 0;
|
|
56344
56589
|
var LayoutZIndex;
|
|
56345
56590
|
(function (LayoutZIndex) {
|
|
56591
|
+
LayoutZIndex[LayoutZIndex["SeriesGroup"] = 0] = "SeriesGroup";
|
|
56346
56592
|
LayoutZIndex[LayoutZIndex["Axis_Grid"] = 50] = "Axis_Grid";
|
|
56347
56593
|
LayoutZIndex[LayoutZIndex["CrossHair_Grid"] = 100] = "CrossHair_Grid";
|
|
56348
56594
|
LayoutZIndex[LayoutZIndex["Region"] = 450] = "Region";
|
|
@@ -57396,12 +57642,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57396
57642
|
return hasDataZoom || hasScrollBar ? true : this._layout.layoutClip;
|
|
57397
57643
|
}
|
|
57398
57644
|
created() {
|
|
57399
|
-
var _a;
|
|
57645
|
+
var _a, _b;
|
|
57400
57646
|
this.initLayout();
|
|
57401
57647
|
super.created();
|
|
57402
57648
|
const clip = (_a = this._spec.clip) !== null && _a !== void 0 ? _a : this._getClipDefaultValue();
|
|
57403
57649
|
this._groupMark = this._createGroupMark('regionGroup', this.userId, this.layoutZIndex);
|
|
57404
|
-
this._interactionMark = this._createGroupMark('regionInteractionGroup', this.userId + '_interaction', LayoutZIndex.Interaction);
|
|
57650
|
+
this._interactionMark = this._createGroupMark('regionInteractionGroup', ((_b = this.userId) !== null && _b !== void 0 ? _b : this.type) + '_interaction', LayoutZIndex.Interaction);
|
|
57405
57651
|
if (!isEmpty(this._spec.style)) {
|
|
57406
57652
|
this._backgroundMark = this._createMark({ type: "rect", name: 'regionBackground' });
|
|
57407
57653
|
if (clip) {
|
|
@@ -57417,7 +57663,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
57417
57663
|
this._groupMark.addMark(mark);
|
|
57418
57664
|
}
|
|
57419
57665
|
});
|
|
57420
|
-
this._backgroundMark && this._backgroundMark.setZIndex(
|
|
57666
|
+
this._backgroundMark && this._backgroundMark.setZIndex(LayoutZIndex.SeriesGroup - 1);
|
|
57421
57667
|
this._foregroundMark && this._foregroundMark.setZIndex(LayoutZIndex.Mark + 1);
|
|
57422
57668
|
}
|
|
57423
57669
|
this.createTrigger();
|
|
@@ -60384,6 +60630,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
60384
60630
|
}
|
|
60385
60631
|
this._chart.clearState(state);
|
|
60386
60632
|
}
|
|
60633
|
+
clearAllStates() {
|
|
60634
|
+
if (!this._chart) {
|
|
60635
|
+
return;
|
|
60636
|
+
}
|
|
60637
|
+
this._chart.clearAllStates();
|
|
60638
|
+
}
|
|
60387
60639
|
clearSelected() {
|
|
60388
60640
|
if (!this._chart) {
|
|
60389
60641
|
return;
|
|
@@ -60891,7 +61143,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
60891
61143
|
};
|
|
60892
61144
|
registerVChartCore();
|
|
60893
61145
|
|
|
60894
|
-
const version = "1.12.
|
|
61146
|
+
const version = "1.12.4";
|
|
60895
61147
|
|
|
60896
61148
|
const addVChartProperty = (data, op) => {
|
|
60897
61149
|
const context = op.beforeCall();
|
|
@@ -60907,13 +61159,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
60907
61159
|
constructor() {
|
|
60908
61160
|
this.activeTriggerSet = {
|
|
60909
61161
|
mark: new Set(),
|
|
60910
|
-
dimension: new Set(),
|
|
60911
61162
|
group: new Set()
|
|
60912
61163
|
};
|
|
60913
61164
|
this.ignoreTriggerSet = {
|
|
60914
|
-
mark: new Set()
|
|
60915
|
-
dimension: new Set(),
|
|
60916
|
-
group: new Set()
|
|
61165
|
+
mark: new Set()
|
|
60917
61166
|
};
|
|
60918
61167
|
}
|
|
60919
61168
|
}
|
|
@@ -61950,7 +62199,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
61950
62199
|
this._viewDataMap = new Map();
|
|
61951
62200
|
this._viewDataFilter = null;
|
|
61952
62201
|
this._data = null;
|
|
61953
|
-
this.layoutZIndex =
|
|
62202
|
+
this.layoutZIndex = LayoutZIndex.SeriesGroup;
|
|
61954
62203
|
this._invalidType = 'break';
|
|
61955
62204
|
this._region = options.region;
|
|
61956
62205
|
this._dataSet = options.dataSet;
|
|
@@ -63751,13 +64000,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
63751
64000
|
}
|
|
63752
64001
|
|
|
63753
64002
|
function isValidAlignDomain(domain) {
|
|
63754
|
-
return domain.length === 2 && isValidNumber$1(domain[0]) && isValidNumber$1(domain
|
|
64003
|
+
return domain.length === 2 && isValidNumber$1(domain[0]) && isValidNumber$1(last(domain)) && last(domain) >= domain[0];
|
|
63755
64004
|
}
|
|
63756
64005
|
function getScaleInfo(axis, domain) {
|
|
63757
|
-
const total = domain
|
|
63758
|
-
const includeZero = domain
|
|
64006
|
+
const total = last(domain) - domain[0];
|
|
64007
|
+
const includeZero = last(domain) * domain[0] < 0;
|
|
63759
64008
|
let negative = domain[0] <= 0 ? 0 - domain[0] : 0;
|
|
63760
|
-
let positive = domain
|
|
64009
|
+
let positive = last(domain) > 0 ? last(domain) - 0 : 0;
|
|
63761
64010
|
if (total === 0) {
|
|
63762
64011
|
if (domain[0] < 0) {
|
|
63763
64012
|
negative = 1;
|
|
@@ -63992,12 +64241,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
63992
64241
|
return data;
|
|
63993
64242
|
}
|
|
63994
64243
|
const targetDomain = targetScale.domain();
|
|
63995
|
-
const targetRange = targetDomain
|
|
64244
|
+
const targetRange = last(targetDomain) - targetDomain[0];
|
|
63996
64245
|
if (targetRange === 0) {
|
|
63997
64246
|
return data;
|
|
63998
64247
|
}
|
|
63999
64248
|
const currentDomain = currentScale.domain();
|
|
64000
|
-
const currentRange = currentDomain
|
|
64249
|
+
const currentRange = last(currentDomain) - currentDomain[0];
|
|
64001
64250
|
if (targetRange === 0) {
|
|
64002
64251
|
return data;
|
|
64003
64252
|
}
|
|
@@ -64173,6 +64422,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
64173
64422
|
rawValue: value
|
|
64174
64423
|
};
|
|
64175
64424
|
}
|
|
64425
|
+
function shouldUpdateAxis(preHelper, curHelper, forceUpdate) {
|
|
64426
|
+
return forceUpdate || !preHelper || preHelper.getAxisId() === curHelper.getAxisId();
|
|
64427
|
+
}
|
|
64176
64428
|
|
|
64177
64429
|
class ComponentPluginService extends BasePluginService {
|
|
64178
64430
|
constructor(component) {
|
|
@@ -64617,10 +64869,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
64617
64869
|
}
|
|
64618
64870
|
else if (viewData && viewData.latestData && viewData.latestData.length) {
|
|
64619
64871
|
const seriesData = (_a = s.getViewDataStatistics) === null || _a === void 0 ? void 0 : _a.call(s);
|
|
64872
|
+
const userSetBreaks = this.type === ComponentTypeEnum.cartesianLinearAxis && this._spec.breaks && this._spec.breaks.length;
|
|
64620
64873
|
field.forEach(f => {
|
|
64621
64874
|
var _a;
|
|
64622
64875
|
if ((_a = seriesData === null || seriesData === void 0 ? void 0 : seriesData.latestData) === null || _a === void 0 ? void 0 : _a[f]) {
|
|
64623
|
-
|
|
64876
|
+
if (userSetBreaks) {
|
|
64877
|
+
data.push(Object.assign(Object.assign({}, seriesData.latestData[f]), { values: viewData.latestData.map((obj) => obj[f]) }));
|
|
64878
|
+
}
|
|
64879
|
+
else {
|
|
64880
|
+
data.push(seriesData.latestData[f]);
|
|
64881
|
+
}
|
|
64624
64882
|
}
|
|
64625
64883
|
});
|
|
64626
64884
|
}
|
|
@@ -65011,13 +65269,19 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65011
65269
|
eachSeries(this._regions, s => {
|
|
65012
65270
|
const orient = this.getOrient();
|
|
65013
65271
|
if (isXAxis(orient)) {
|
|
65014
|
-
s.
|
|
65272
|
+
if (shouldUpdateAxis(s.getXAxisHelper(), this.axisHelper(), isValid$1(this._seriesUserId) || isValid$1(this._seriesIndex))) {
|
|
65273
|
+
s.setXAxisHelper(this.axisHelper());
|
|
65274
|
+
}
|
|
65015
65275
|
}
|
|
65016
65276
|
else if (isYAxis(orient)) {
|
|
65017
|
-
s.
|
|
65277
|
+
if (shouldUpdateAxis(s.getYAxisHelper(), this.axisHelper(), isValid$1(this._seriesUserId) || isValid$1(this._seriesIndex))) {
|
|
65278
|
+
s.setYAxisHelper(this.axisHelper());
|
|
65279
|
+
}
|
|
65018
65280
|
}
|
|
65019
65281
|
else if (isZAxis(orient)) {
|
|
65020
|
-
s.
|
|
65282
|
+
if (shouldUpdateAxis(s.getZAxisHelper(), this.axisHelper(), isValid$1(this._seriesUserId) || isValid$1(this._seriesIndex))) {
|
|
65283
|
+
s.setZAxisHelper(this.axisHelper());
|
|
65284
|
+
}
|
|
65021
65285
|
}
|
|
65022
65286
|
}, {
|
|
65023
65287
|
userId: this._seriesUserId,
|
|
@@ -65091,7 +65355,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65091
65355
|
? (_a = item
|
|
65092
65356
|
.getTickData()
|
|
65093
65357
|
.getLatestData()) === null || _a === void 0 ? void 0 : _a.find((d) => d.value === 0)
|
|
65094
|
-
: item.getScale().domain()[0] <= 0 && item.getScale().domain()
|
|
65358
|
+
: item.getScale().domain()[0] <= 0 && last(item.getScale().domain()) >= 0));
|
|
65095
65359
|
};
|
|
65096
65360
|
const relativeAxes = axesComponents.filter(item => isValidAxis(item));
|
|
65097
65361
|
if (relativeAxes.length) {
|
|
@@ -65197,8 +65461,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65197
65461
|
setLayout3dBox(box3d) {
|
|
65198
65462
|
this.layout3dBox = box3d;
|
|
65199
65463
|
}
|
|
65200
|
-
|
|
65201
|
-
let isScaleChange = false;
|
|
65464
|
+
getNewScaleRange() {
|
|
65202
65465
|
const { width, height } = this.getLayoutRect();
|
|
65203
65466
|
const { left, right, top, bottom } = this._innerOffset;
|
|
65204
65467
|
let newRange = [];
|
|
@@ -65218,8 +65481,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65218
65481
|
newRange = this._inverse ? [top, height - bottom] : [height - bottom, top];
|
|
65219
65482
|
}
|
|
65220
65483
|
}
|
|
65221
|
-
|
|
65222
|
-
|
|
65484
|
+
return newRange;
|
|
65485
|
+
}
|
|
65486
|
+
updateScaleRange() {
|
|
65487
|
+
let isScaleChange = false;
|
|
65488
|
+
const newRange = this.getNewScaleRange();
|
|
65489
|
+
const range = this._scale.range();
|
|
65490
|
+
if (newRange.length === range.length && newRange.every((value, index) => value === range[index])) {
|
|
65491
|
+
isScaleChange = false;
|
|
65492
|
+
}
|
|
65493
|
+
else {
|
|
65223
65494
|
isScaleChange = true;
|
|
65224
65495
|
this._scale.range(newRange);
|
|
65225
65496
|
}
|
|
@@ -65387,16 +65658,22 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65387
65658
|
const orient = this.getOrient();
|
|
65388
65659
|
eachSeries(this._regions, s => {
|
|
65389
65660
|
if (isXAxis(orient)) {
|
|
65390
|
-
s.
|
|
65391
|
-
|
|
65661
|
+
if (shouldUpdateAxis(s.getXAxisHelper(), this.axisHelper(), isValid$1(this._seriesUserId) || isValid$1(this._seriesIndex))) {
|
|
65662
|
+
s.setScaleX(this._scale);
|
|
65663
|
+
s.setXAxisHelper(this.axisHelper());
|
|
65664
|
+
}
|
|
65392
65665
|
}
|
|
65393
65666
|
else if (isYAxis(orient)) {
|
|
65394
|
-
s.
|
|
65395
|
-
|
|
65667
|
+
if (shouldUpdateAxis(s.getYAxisHelper(), this.axisHelper(), isValid$1(this._seriesUserId) || isValid$1(this._seriesIndex))) {
|
|
65668
|
+
s.setScaleY(this._scale);
|
|
65669
|
+
s.setYAxisHelper(this.axisHelper());
|
|
65670
|
+
}
|
|
65396
65671
|
}
|
|
65397
65672
|
else if (isZAxis(orient)) {
|
|
65398
|
-
s.
|
|
65399
|
-
|
|
65673
|
+
if (shouldUpdateAxis(s.getZAxisHelper(), this.axisHelper(), isValid$1(this._seriesUserId) || isValid$1(this._seriesIndex))) {
|
|
65674
|
+
s.setScaleZ(this._scale);
|
|
65675
|
+
s.setZAxisHelper(this.axisHelper());
|
|
65676
|
+
}
|
|
65400
65677
|
}
|
|
65401
65678
|
}, {
|
|
65402
65679
|
userId: this._seriesUserId,
|
|
@@ -65455,7 +65732,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65455
65732
|
: clamp$1(pos, this._innerOffset.top, this.getLayoutRect().height - this._innerOffset.bottom);
|
|
65456
65733
|
}
|
|
65457
65734
|
const range = this._scale.range();
|
|
65458
|
-
if ((pos - range[0]) * (pos - range
|
|
65735
|
+
if ((pos - range[0]) * (pos - last(range)) > 0) {
|
|
65459
65736
|
return null;
|
|
65460
65737
|
}
|
|
65461
65738
|
return this._scale.invert(pos);
|
|
@@ -65594,7 +65871,17 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65594
65871
|
const normalizedValue = this._getNormalizedValue([obj.value], length);
|
|
65595
65872
|
return getAxisItem(obj.value, normalizedValue);
|
|
65596
65873
|
})
|
|
65597
|
-
.filter((entry) =>
|
|
65874
|
+
.filter((entry) => {
|
|
65875
|
+
const { value, rawValue } = entry;
|
|
65876
|
+
const domain = this._scale.domain();
|
|
65877
|
+
if (this.getSpec().type === 'log') {
|
|
65878
|
+
return value >= 0 && value <= 1;
|
|
65879
|
+
}
|
|
65880
|
+
if (isContinuous(this._scale.type)) {
|
|
65881
|
+
return rawValue >= domain[0] && rawValue <= last(domain);
|
|
65882
|
+
}
|
|
65883
|
+
return domain.includes(rawValue);
|
|
65884
|
+
})
|
|
65598
65885
|
];
|
|
65599
65886
|
}
|
|
65600
65887
|
return [];
|
|
@@ -65623,17 +65910,21 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65623
65910
|
});
|
|
65624
65911
|
if (this._autoIndentOnce && this._hasAutoIndent) {
|
|
65625
65912
|
['x1', 'x2', 'y1', 'y2'].forEach(key => {
|
|
65626
|
-
this.layout.getLastComputeOutBounds()[key] =
|
|
65913
|
+
this.layout.getLastComputeOutBounds()[key] =
|
|
65914
|
+
this._layoutCache._lastComputeOutBounds[key];
|
|
65627
65915
|
});
|
|
65628
65916
|
}
|
|
65629
65917
|
else {
|
|
65630
65918
|
this._hasAutoIndent = true;
|
|
65631
65919
|
['x1', 'x2', 'y1', 'y2'].forEach(key => {
|
|
65632
|
-
if (this.layout.getLastComputeOutBounds()[key] <
|
|
65633
|
-
this.
|
|
65920
|
+
if (this.layout.getLastComputeOutBounds()[key] <
|
|
65921
|
+
this._layoutCache._lastComputeOutBounds[key]) {
|
|
65922
|
+
this.layout.getLastComputeOutBounds()[key] =
|
|
65923
|
+
this._layoutCache._lastComputeOutBounds[key];
|
|
65634
65924
|
}
|
|
65635
65925
|
else {
|
|
65636
|
-
this._layoutCache._lastComputeOutBounds[key] =
|
|
65926
|
+
this._layoutCache._lastComputeOutBounds[key] =
|
|
65927
|
+
this.layout.getLastComputeOutBounds()[key];
|
|
65637
65928
|
}
|
|
65638
65929
|
});
|
|
65639
65930
|
}
|
|
@@ -65703,6 +65994,60 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65703
65994
|
CartesianAxis.type = ComponentTypeEnum.cartesianAxis;
|
|
65704
65995
|
CartesianAxis.specKey = 'axes';
|
|
65705
65996
|
|
|
65997
|
+
const setDomain = (min, max, breaks) => breaks.reduce((r, b, i) => {
|
|
65998
|
+
r.push([b, breaks.length === i + 1 ? max : breaks[i + 1]]);
|
|
65999
|
+
return r;
|
|
66000
|
+
}, [[min, breaks[0]]]);
|
|
66001
|
+
function breakDomain(data, points) {
|
|
66002
|
+
const min = data[0];
|
|
66003
|
+
const max = data[data.length - 1];
|
|
66004
|
+
const breaks = points.filter(point => point > min && point < max);
|
|
66005
|
+
if (breaks.length === 0) {
|
|
66006
|
+
return [[min, max]];
|
|
66007
|
+
}
|
|
66008
|
+
return setDomain(min, max, breaks);
|
|
66009
|
+
}
|
|
66010
|
+
const sorter = (a, b) => a - b;
|
|
66011
|
+
const fillBins = (data, points) => {
|
|
66012
|
+
const bins = [0];
|
|
66013
|
+
let i = 0;
|
|
66014
|
+
let j = 0;
|
|
66015
|
+
while (i < points.length) {
|
|
66016
|
+
if (data[j] <= points[i]) {
|
|
66017
|
+
bins[i] += 1;
|
|
66018
|
+
j += 1;
|
|
66019
|
+
}
|
|
66020
|
+
else {
|
|
66021
|
+
i += 1;
|
|
66022
|
+
bins[i] = 0;
|
|
66023
|
+
}
|
|
66024
|
+
}
|
|
66025
|
+
bins[i] = data.slice(j).length;
|
|
66026
|
+
return bins;
|
|
66027
|
+
};
|
|
66028
|
+
function breakScope(data, points) {
|
|
66029
|
+
const bins = fillBins(data, points);
|
|
66030
|
+
const count = data.length;
|
|
66031
|
+
return bins
|
|
66032
|
+
.reduce((res, bin, i) => {
|
|
66033
|
+
const last = res[i - 1] ? res[i - 1][1] : 0;
|
|
66034
|
+
const next = (last * 100 + +(bin / count).toFixed(2) * 100) / 100;
|
|
66035
|
+
res.push([last, next > 1 ? 1 : next > 0.95 ? 1 : next]);
|
|
66036
|
+
return res;
|
|
66037
|
+
}, [])
|
|
66038
|
+
.filter(s => {
|
|
66039
|
+
return !(s[0] === 0 && s[1] === 0) && !(s[0] === 1 && s[1] === 1);
|
|
66040
|
+
});
|
|
66041
|
+
}
|
|
66042
|
+
function breakData(data, points) {
|
|
66043
|
+
data.sort(sorter);
|
|
66044
|
+
points.sort(sorter);
|
|
66045
|
+
return {
|
|
66046
|
+
domain: breakDomain(data, points),
|
|
66047
|
+
scope: breakScope(data, points)
|
|
66048
|
+
};
|
|
66049
|
+
}
|
|
66050
|
+
|
|
65706
66051
|
const e10 = Math.sqrt(50);
|
|
65707
66052
|
const e5 = Math.sqrt(10);
|
|
65708
66053
|
const e2 = Math.sqrt(2);
|
|
@@ -65733,7 +66078,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65733
66078
|
}
|
|
65734
66079
|
else if (isFunction$1(tick.tickCount)) {
|
|
65735
66080
|
const range = this._scale.range();
|
|
65736
|
-
let rangeSize = Math.abs(range
|
|
66081
|
+
let rangeSize = Math.abs(last(range) - range[0]);
|
|
65737
66082
|
if (rangeSize === 1 && this._option) {
|
|
65738
66083
|
const isX = isXAxis(this._orient);
|
|
65739
66084
|
rangeSize = isX ? this._option.getChartViewRect().width : this._option.getChartViewRect().height;
|
|
@@ -65794,13 +66139,48 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65794
66139
|
return this._scale.scale(value);
|
|
65795
66140
|
}
|
|
65796
66141
|
computeLinearDomain(data) {
|
|
65797
|
-
|
|
66142
|
+
let domain = [];
|
|
65798
66143
|
if (data.length) {
|
|
66144
|
+
const userSetBreaks = this._spec.breaks && this._spec.breaks.length;
|
|
66145
|
+
let values = [];
|
|
66146
|
+
let minDomain;
|
|
66147
|
+
let maxDomain;
|
|
65799
66148
|
data.forEach(d => {
|
|
65800
66149
|
const { min, max } = d;
|
|
65801
|
-
|
|
65802
|
-
|
|
66150
|
+
minDomain = minDomain === undefined ? min : Math.min(minDomain, min);
|
|
66151
|
+
maxDomain = maxDomain === undefined ? max : Math.max(maxDomain, max);
|
|
66152
|
+
if (userSetBreaks) {
|
|
66153
|
+
values = values.concat(d.values);
|
|
66154
|
+
}
|
|
65803
66155
|
});
|
|
66156
|
+
if (userSetBreaks) {
|
|
66157
|
+
const breakRanges = [];
|
|
66158
|
+
const breaks = [];
|
|
66159
|
+
for (let index = 0; index < this._spec.breaks.length; index++) {
|
|
66160
|
+
const { range } = this._spec.breaks[index];
|
|
66161
|
+
if (range[0] <= range[1] && range[1] <= maxDomain) {
|
|
66162
|
+
breakRanges.push(range);
|
|
66163
|
+
breaks.push(this._spec.breaks[index]);
|
|
66164
|
+
}
|
|
66165
|
+
}
|
|
66166
|
+
breakRanges.sort((a, b) => a[0] - b[0]);
|
|
66167
|
+
if (breakRanges.length) {
|
|
66168
|
+
const { domain: breakDomains, scope: breakScopes } = breakData(values, combineDomains(breakRanges));
|
|
66169
|
+
domain = combineDomains(breakDomains);
|
|
66170
|
+
this._break = {
|
|
66171
|
+
domain: breakDomains,
|
|
66172
|
+
scope: breakScopes,
|
|
66173
|
+
breakDomains: breakRanges,
|
|
66174
|
+
breaks
|
|
66175
|
+
};
|
|
66176
|
+
}
|
|
66177
|
+
else {
|
|
66178
|
+
domain = [minDomain, maxDomain];
|
|
66179
|
+
}
|
|
66180
|
+
}
|
|
66181
|
+
else {
|
|
66182
|
+
domain = [minDomain, maxDomain];
|
|
66183
|
+
}
|
|
65804
66184
|
}
|
|
65805
66185
|
else {
|
|
65806
66186
|
domain[0] = 0;
|
|
@@ -65817,7 +66197,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65817
66197
|
return;
|
|
65818
66198
|
}
|
|
65819
66199
|
let domainMin = domain[0];
|
|
65820
|
-
let domainMax = domain
|
|
66200
|
+
let domainMax = last(domain);
|
|
65821
66201
|
if (domainMin === domainMax) {
|
|
65822
66202
|
if (domainMax === 0) {
|
|
65823
66203
|
domainMax = 1;
|
|
@@ -65847,7 +66227,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65847
66227
|
num = Math.abs(num);
|
|
65848
66228
|
if (num < 1) {
|
|
65849
66229
|
domain[0] = 0;
|
|
65850
|
-
domain[1] = 1;
|
|
66230
|
+
domain[domain.length - 1] = 1;
|
|
65851
66231
|
}
|
|
65852
66232
|
else {
|
|
65853
66233
|
let step = num / DEFAULT_TICK_COUNT;
|
|
@@ -65855,12 +66235,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65855
66235
|
const err = step / Math.pow(10, power);
|
|
65856
66236
|
step = (err >= e10 ? 10 : err >= e5 ? 5 : err >= e2 ? 2 : 1) * Math.pow(10, power);
|
|
65857
66237
|
domain[0] = 0;
|
|
65858
|
-
domain[1] = step * 10;
|
|
66238
|
+
domain[domain.length - 1] = step * 10;
|
|
65859
66239
|
}
|
|
65860
66240
|
if (flag < 0) {
|
|
65861
66241
|
domain.reverse();
|
|
65862
66242
|
domain[0] *= -1;
|
|
65863
|
-
domain[1] *= -1;
|
|
66243
|
+
domain[domain.length - 1] *= -1;
|
|
65864
66244
|
}
|
|
65865
66245
|
}
|
|
65866
66246
|
return domain;
|
|
@@ -65868,7 +66248,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65868
66248
|
includeZero(domain) {
|
|
65869
66249
|
if (this._zero) {
|
|
65870
66250
|
domain[0] = Math.min(domain[0], 0);
|
|
65871
|
-
domain[domain.length - 1] = Math.max(domain
|
|
66251
|
+
domain[domain.length - 1] = Math.max(last(domain), 0);
|
|
65872
66252
|
}
|
|
65873
66253
|
}
|
|
65874
66254
|
setExtendDomain(key, value) {
|
|
@@ -65910,7 +66290,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65910
66290
|
}
|
|
65911
66291
|
const { min, max } = this._domain;
|
|
65912
66292
|
isValid$1(min) && (domain[0] = min);
|
|
65913
|
-
isValid$1(max) && (domain[1] = max);
|
|
66293
|
+
isValid$1(max) && (domain[domain.length - 1] = max);
|
|
65914
66294
|
}
|
|
65915
66295
|
setSoftDomainMinMax(domain) {
|
|
65916
66296
|
const { softMin, softMax } = this._spec;
|
|
@@ -65927,10 +66307,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65927
66307
|
if (isValid$1(softMax)) {
|
|
65928
66308
|
let softMaxValue = isFunction$1(softMax) ? softMax(domain) : softMax;
|
|
65929
66309
|
if (isNil$1(softMaxValue)) {
|
|
65930
|
-
softMaxValue = domain
|
|
66310
|
+
softMaxValue = last(domain);
|
|
65931
66311
|
}
|
|
65932
|
-
if (softMaxValue >= domain
|
|
65933
|
-
domain[1] = softMaxValue;
|
|
66312
|
+
if (softMaxValue >= last(domain)) {
|
|
66313
|
+
domain[domain.length - 1] = softMaxValue;
|
|
65934
66314
|
}
|
|
65935
66315
|
this._softMaxValue = softMaxValue;
|
|
65936
66316
|
}
|
|
@@ -65969,7 +66349,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
65969
66349
|
return this._domainAfterSpec;
|
|
65970
66350
|
}
|
|
65971
66351
|
_updateNiceLabelFormatter(domain) {
|
|
65972
|
-
const domainSpan = Math.abs(domain
|
|
66352
|
+
const domainSpan = Math.abs(last(domain) - domain[0]);
|
|
65973
66353
|
const n = Math.max(-Math.floor(Math.log10(domainSpan)), 0) + 2;
|
|
65974
66354
|
const unit = Math.pow(10, n);
|
|
65975
66355
|
this.niceLabelFormatter = (value) => {
|
|
@@ -66006,6 +66386,46 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
66006
66386
|
}
|
|
66007
66387
|
this._scale.domain(range);
|
|
66008
66388
|
}
|
|
66389
|
+
_tickTransformOption() {
|
|
66390
|
+
var _a;
|
|
66391
|
+
return Object.assign(Object.assign({}, super._tickTransformOption()), { breakData: ((_a = this._spec.breaks) === null || _a === void 0 ? void 0 : _a.length) ? () => this._break : null });
|
|
66392
|
+
}
|
|
66393
|
+
_getUpdateAttribute(ignoreGrid) {
|
|
66394
|
+
var _a, _b;
|
|
66395
|
+
const attrs = super._getUpdateAttribute(ignoreGrid);
|
|
66396
|
+
if (!isZAxis(this._orient) && ((_b = (_a = this._break) === null || _a === void 0 ? void 0 : _a.breaks) === null || _b === void 0 ? void 0 : _b.length)) {
|
|
66397
|
+
const { width, height } = this.getLayoutRect();
|
|
66398
|
+
const isX = isXAxis(this._orient);
|
|
66399
|
+
const axisLength = isX ? width : height;
|
|
66400
|
+
attrs.breaks = this._break.breaks.map(obj => {
|
|
66401
|
+
const { range, breakSymbol, gap = 6 } = obj;
|
|
66402
|
+
const position = this.valueToPosition((range[0] + range[1]) / 2);
|
|
66403
|
+
const ratio = position / axisLength;
|
|
66404
|
+
let gapRatio;
|
|
66405
|
+
if (isPercent(gap)) {
|
|
66406
|
+
gapRatio = Number(gap.substring(0, gap.length - 1)) / 100;
|
|
66407
|
+
}
|
|
66408
|
+
else {
|
|
66409
|
+
gapRatio = gap / axisLength;
|
|
66410
|
+
}
|
|
66411
|
+
const symbolAngle = isValidNumber$1(breakSymbol === null || breakSymbol === void 0 ? void 0 : breakSymbol.angle) ? breakSymbol.angle : isX ? 60 : 15;
|
|
66412
|
+
return {
|
|
66413
|
+
range: [ratio - gapRatio / 2, ratio + gapRatio / 2],
|
|
66414
|
+
breakSymbol: Object.assign(Object.assign({ visible: true }, breakSymbol), { angle: (symbolAngle * Math.PI) / 180 }),
|
|
66415
|
+
rawRange: range
|
|
66416
|
+
};
|
|
66417
|
+
});
|
|
66418
|
+
}
|
|
66419
|
+
return attrs;
|
|
66420
|
+
}
|
|
66421
|
+
getNewScaleRange() {
|
|
66422
|
+
var _a, _b;
|
|
66423
|
+
let newRange = super.getNewScaleRange();
|
|
66424
|
+
if (((_a = this._spec.breaks) === null || _a === void 0 ? void 0 : _a.length) && ((_b = this._break) === null || _b === void 0 ? void 0 : _b.scope)) {
|
|
66425
|
+
newRange = combineDomains(this._break.scope).map(val => newRange[0] + (last(newRange) - newRange[0]) * val);
|
|
66426
|
+
}
|
|
66427
|
+
return newRange;
|
|
66428
|
+
}
|
|
66009
66429
|
computeDomain(data) {
|
|
66010
66430
|
return this.computeLinearDomain(data);
|
|
66011
66431
|
}
|
|
@@ -66340,10 +66760,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
66340
66760
|
this.computeData(params === null || params === void 0 ? void 0 : params.value);
|
|
66341
66761
|
eachSeries(this._regions, s => {
|
|
66342
66762
|
if (isXAxis(this.getOrient())) {
|
|
66343
|
-
s.
|
|
66763
|
+
if (shouldUpdateAxis(s.getXAxisHelper(), this.axisHelper(), isValid$1(this._seriesUserId) || isValid$1(this._seriesIndex))) {
|
|
66764
|
+
s.setXAxisHelper(this.axisHelper());
|
|
66765
|
+
}
|
|
66344
66766
|
}
|
|
66345
66767
|
else {
|
|
66346
|
-
s.
|
|
66768
|
+
if (shouldUpdateAxis(s.getYAxisHelper(), this.axisHelper(), isValid$1(this._seriesUserId) || isValid$1(this._seriesIndex))) {
|
|
66769
|
+
s.setYAxisHelper(this.axisHelper());
|
|
66770
|
+
}
|
|
66347
66771
|
}
|
|
66348
66772
|
}, {
|
|
66349
66773
|
userId: this._seriesUserId,
|
|
@@ -66521,9 +66945,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
66521
66945
|
}
|
|
66522
66946
|
initTooltip() {
|
|
66523
66947
|
super.initTooltip();
|
|
66524
|
-
const {
|
|
66948
|
+
const { group, mark } = this._tooltipHelper.activeTriggerSet;
|
|
66525
66949
|
if (this._lineMark) {
|
|
66526
|
-
dimension.add(this._lineMark);
|
|
66527
66950
|
group.add(this._lineMark);
|
|
66528
66951
|
}
|
|
66529
66952
|
if (this._symbolMark) {
|
|
@@ -67763,6 +68186,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
67763
68186
|
return;
|
|
67764
68187
|
});
|
|
67765
68188
|
}
|
|
68189
|
+
clearAllStates() {
|
|
68190
|
+
this.getAllRegions().forEach(r => {
|
|
68191
|
+
r.interaction.clearAllEventElement();
|
|
68192
|
+
r.interaction.resetAllInteraction();
|
|
68193
|
+
return;
|
|
68194
|
+
});
|
|
68195
|
+
}
|
|
67766
68196
|
clearSelected() {
|
|
67767
68197
|
this.clearState(STATE_VALUE_ENUM.STATE_SELECTED);
|
|
67768
68198
|
}
|
|
@@ -68676,13 +69106,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
68676
69106
|
}
|
|
68677
69107
|
initTooltip() {
|
|
68678
69108
|
this._tooltipHelper = new AreaSeriesTooltipHelper(this);
|
|
68679
|
-
const {
|
|
69109
|
+
const { group, mark } = this._tooltipHelper.activeTriggerSet;
|
|
68680
69110
|
if (this._areaMark) {
|
|
68681
|
-
dimension.add(this._areaMark);
|
|
68682
69111
|
group.add(this._areaMark);
|
|
68683
69112
|
}
|
|
68684
69113
|
if (this._lineMark) {
|
|
68685
|
-
dimension.add(this._lineMark);
|
|
68686
69114
|
group.add(this._lineMark);
|
|
68687
69115
|
}
|
|
68688
69116
|
if (this._symbolMark) {
|
|
@@ -69301,7 +69729,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
69301
69729
|
[STACK_FIELD_END_PERCENT]: maxPercent
|
|
69302
69730
|
}
|
|
69303
69731
|
: undefined));
|
|
69304
|
-
|
|
69732
|
+
const rectAttr = this.direction === "horizontal"
|
|
69305
69733
|
? {
|
|
69306
69734
|
x: this._getBarXStart(mockDatum, xScale),
|
|
69307
69735
|
x1: this._getBarXEnd(mockDatum, xScale),
|
|
@@ -69313,7 +69741,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
69313
69741
|
y1: this._getBarYEnd(mockDatum, yScale),
|
|
69314
69742
|
x: this._getPosition(this.direction, mockDatum),
|
|
69315
69743
|
width: this._getBarWidth(this._xAxisHelper)
|
|
69316
|
-
}
|
|
69744
|
+
};
|
|
69745
|
+
rectPaths.push(createRect(Object.assign(Object.assign({}, rectAttr), { cornerRadius: isFunction$1(this._spec.stackCornerRadius)
|
|
69746
|
+
? this._spec.stackCornerRadius(rectAttr, mockDatum, this._markAttributeContext)
|
|
69747
|
+
: this._spec.stackCornerRadius, fill: true })));
|
|
69317
69748
|
});
|
|
69318
69749
|
return rectPaths;
|
|
69319
69750
|
});
|
|
@@ -73401,7 +73832,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
73401
73832
|
}
|
|
73402
73833
|
initTooltip() {
|
|
73403
73834
|
this._tooltipHelper = new RangeAreaSeriesTooltipHelper(this);
|
|
73404
|
-
this._areaMark && this._tooltipHelper.activeTriggerSet.dimension.add(this._areaMark);
|
|
73405
73835
|
}
|
|
73406
73836
|
_isFieldAllValid() {
|
|
73407
73837
|
const viewStatistics = this.getViewDataStatistics();
|
|
@@ -74096,12 +74526,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
74096
74526
|
customShape: (_a = this._spec.pie) === null || _a === void 0 ? void 0 : _a.customShape,
|
|
74097
74527
|
stateSort: (_b = this._spec.pie) === null || _b === void 0 ? void 0 : _b.stateSort
|
|
74098
74528
|
});
|
|
74099
|
-
this.
|
|
74100
|
-
|
|
74101
|
-
|
|
74102
|
-
|
|
74103
|
-
|
|
74104
|
-
|
|
74529
|
+
if (this._showEmptyCircle) {
|
|
74530
|
+
this._emptyArcMark = this._createMark({
|
|
74531
|
+
name: 'emptyCircle',
|
|
74532
|
+
type: 'arc'
|
|
74533
|
+
}, {
|
|
74534
|
+
dataView: false
|
|
74535
|
+
});
|
|
74536
|
+
}
|
|
74105
74537
|
}
|
|
74106
74538
|
startAngleScale(datum) {
|
|
74107
74539
|
return field$2(ARC_START_ANGLE)(datum);
|
|
@@ -74135,7 +74567,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
74135
74567
|
}
|
|
74136
74568
|
const emptyPieMark = this._emptyArcMark;
|
|
74137
74569
|
if (emptyPieMark) {
|
|
74138
|
-
this.setMarkStyle(emptyPieMark, Object.assign(Object.assign({}, initialStyle), { visible: () => this.
|
|
74570
|
+
this.setMarkStyle(emptyPieMark, Object.assign(Object.assign({}, initialStyle), { visible: () => this.getViewData().latestData.length === 0 }), 'normal', AttributeLevel.Series);
|
|
74139
74571
|
}
|
|
74140
74572
|
}
|
|
74141
74573
|
initInteraction() {
|
|
@@ -74643,10 +75075,14 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
74643
75075
|
this.computeData(param === null || param === void 0 ? void 0 : param.value);
|
|
74644
75076
|
eachSeries(this._regions, s => {
|
|
74645
75077
|
if (this.getOrient() === 'radius') {
|
|
74646
|
-
s.radiusAxisHelper
|
|
75078
|
+
if (shouldUpdateAxis(s.radiusAxisHelper, this.axisHelper(), isValid$1(this._seriesUserId) || isValid$1(this._seriesIndex))) {
|
|
75079
|
+
s.radiusAxisHelper = this.axisHelper();
|
|
75080
|
+
}
|
|
74647
75081
|
}
|
|
74648
75082
|
else {
|
|
74649
|
-
s.angleAxisHelper
|
|
75083
|
+
if (shouldUpdateAxis(s.angleAxisHelper, this.axisHelper(), isValid$1(this._seriesUserId) || isValid$1(this._seriesIndex))) {
|
|
75084
|
+
s.angleAxisHelper = this.axisHelper();
|
|
75085
|
+
}
|
|
74650
75086
|
}
|
|
74651
75087
|
}, {
|
|
74652
75088
|
userId: this._seriesUserId,
|
|
@@ -74736,12 +75172,16 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
74736
75172
|
updateSeriesScale() {
|
|
74737
75173
|
eachSeries(this._regions, s => {
|
|
74738
75174
|
if (this.getOrient() === 'radius') {
|
|
74739
|
-
s.
|
|
74740
|
-
|
|
75175
|
+
if (shouldUpdateAxis(s.radiusAxisHelper, this.axisHelper(), isValid$1(this._seriesUserId) || isValid$1(this._seriesIndex))) {
|
|
75176
|
+
s.setRadiusScale(this._scale);
|
|
75177
|
+
s.radiusAxisHelper = this.axisHelper();
|
|
75178
|
+
}
|
|
74741
75179
|
}
|
|
74742
75180
|
else {
|
|
74743
|
-
s.
|
|
74744
|
-
|
|
75181
|
+
if (shouldUpdateAxis(s.angleAxisHelper, this.axisHelper(), isValid$1(this._seriesUserId) || isValid$1(this._seriesIndex))) {
|
|
75182
|
+
s.setAngleScale(this._scale);
|
|
75183
|
+
s.angleAxisHelper = this.axisHelper();
|
|
75184
|
+
}
|
|
74745
75185
|
}
|
|
74746
75186
|
}, {
|
|
74747
75187
|
userId: this._seriesUserId,
|
|
@@ -75459,13 +75899,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
75459
75899
|
}
|
|
75460
75900
|
initTooltip() {
|
|
75461
75901
|
super.initTooltip();
|
|
75462
|
-
const {
|
|
75902
|
+
const { group, mark } = this._tooltipHelper.activeTriggerSet;
|
|
75463
75903
|
if (this._lineMark) {
|
|
75464
|
-
dimension.add(this._lineMark);
|
|
75465
75904
|
group.add(this._lineMark);
|
|
75466
75905
|
}
|
|
75467
75906
|
if (this._areaMark) {
|
|
75468
|
-
dimension.add(this._areaMark);
|
|
75469
75907
|
group.add(this._areaMark);
|
|
75470
75908
|
}
|
|
75471
75909
|
if (this._symbolMark) {
|
|
@@ -75551,40 +75989,26 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
75551
75989
|
},
|
|
75552
75990
|
content: [
|
|
75553
75991
|
{
|
|
75554
|
-
hasShape: true,
|
|
75555
|
-
shapeType: 'square',
|
|
75556
|
-
shapeColor: this.shapeColorCallback,
|
|
75557
|
-
shapeStroke: this.shapeStrokeCallback,
|
|
75558
75992
|
key: (datum) => datum.type,
|
|
75559
75993
|
value: (datum) => datum.id
|
|
75560
75994
|
},
|
|
75561
75995
|
{
|
|
75562
|
-
hasShape: true,
|
|
75563
|
-
shapeType: 'square',
|
|
75564
|
-
shapeColor: this.shapeColorCallback,
|
|
75565
|
-
shapeStroke: this.shapeStrokeCallback,
|
|
75566
75996
|
key: 'event_time',
|
|
75567
75997
|
value: (datum) => TimeUtil.getInstance().timeFormat('%Y%m%d', datum.event_time)
|
|
75568
75998
|
},
|
|
75569
75999
|
{
|
|
75570
|
-
hasShape: true,
|
|
75571
|
-
shapeType: 'square',
|
|
75572
|
-
shapeColor: this.shapeColorCallback,
|
|
75573
|
-
shapeStroke: this.shapeStrokeCallback,
|
|
75574
76000
|
key: 'action_type',
|
|
75575
76001
|
value: (datum) => datum.action_type
|
|
75576
76002
|
},
|
|
75577
76003
|
{
|
|
75578
|
-
shapeType: 'square',
|
|
75579
|
-
hasShape: true,
|
|
75580
|
-
shapeColor: this.shapeColorCallback,
|
|
75581
|
-
shapeStroke: this.shapeStrokeCallback,
|
|
75582
76004
|
key: 'children',
|
|
75583
76005
|
value: (datum) => {
|
|
75584
76006
|
return datum.children;
|
|
75585
76007
|
}
|
|
75586
76008
|
}
|
|
75587
|
-
]
|
|
76009
|
+
].map(entry => {
|
|
76010
|
+
return Object.assign({ hasShape: true, shapeType: 'square', shapeColor: this.shapeColorCallback, shapeStroke: this.shapeStrokeCallback }, entry);
|
|
76011
|
+
}),
|
|
75588
76012
|
updateContent: (prev, datum, params) => {
|
|
75589
76013
|
const childrenContent = [];
|
|
75590
76014
|
const childrenPrev = prev.filter((p) => p.key === 'children');
|
|
@@ -75970,38 +76394,24 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
75970
76394
|
},
|
|
75971
76395
|
content: [
|
|
75972
76396
|
{
|
|
75973
|
-
hasShape: true,
|
|
75974
|
-
shapeType: 'square',
|
|
75975
|
-
shapeColor: this.shapeColorCallback,
|
|
75976
|
-
shapeStroke: this.shapeStrokeCallback,
|
|
75977
76397
|
key: 'time',
|
|
75978
76398
|
value: (datum) => TimeUtil.getInstance().timeFormat('%Y%m%d %H:%M', datum.from.split('_')[1])
|
|
75979
76399
|
},
|
|
75980
76400
|
{
|
|
75981
|
-
hasShape: true,
|
|
75982
|
-
shapeType: 'square',
|
|
75983
|
-
shapeColor: this.shapeColorCallback,
|
|
75984
|
-
shapeStroke: this.shapeStrokeCallback,
|
|
75985
76401
|
key: 'type',
|
|
75986
76402
|
value: (datum) => datum.action_type
|
|
75987
76403
|
},
|
|
75988
76404
|
{
|
|
75989
|
-
hasShape: true,
|
|
75990
|
-
shapeType: 'square',
|
|
75991
|
-
shapeColor: this.shapeColorCallback,
|
|
75992
|
-
shapeStroke: this.shapeStrokeCallback,
|
|
75993
76405
|
key: 'from',
|
|
75994
76406
|
value: (datum) => datum.from
|
|
75995
76407
|
},
|
|
75996
76408
|
{
|
|
75997
|
-
hasShape: true,
|
|
75998
|
-
shapeType: 'square',
|
|
75999
|
-
shapeColor: this.shapeColorCallback,
|
|
76000
|
-
shapeStroke: this.shapeStrokeCallback,
|
|
76001
76409
|
key: 'to',
|
|
76002
76410
|
value: (datum) => datum.to
|
|
76003
76411
|
}
|
|
76004
|
-
]
|
|
76412
|
+
].map(entry => {
|
|
76413
|
+
return Object.assign({ hasShape: true, shapeType: 'square', shapeColor: this.shapeColorCallback, shapeStroke: this.shapeStrokeCallback }, entry);
|
|
76414
|
+
})
|
|
76005
76415
|
};
|
|
76006
76416
|
}
|
|
76007
76417
|
return null;
|
|
@@ -77118,7 +77528,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
77118
77528
|
}
|
|
77119
77529
|
}
|
|
77120
77530
|
initMarkStyleOfWord(wordMark, wordSpec, colorHexField, seriesField, isFillingWord) {
|
|
77121
|
-
var _a, _b
|
|
77531
|
+
var _a, _b;
|
|
77122
77532
|
if (!wordMark) {
|
|
77123
77533
|
return;
|
|
77124
77534
|
}
|
|
@@ -77130,16 +77540,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
77130
77540
|
: (datum) => datum[this._textField],
|
|
77131
77541
|
x: (datum) => datum.x,
|
|
77132
77542
|
y: (datum) => datum.y,
|
|
77133
|
-
fontFamily: (datum) => datum.fontFamily,
|
|
77134
77543
|
fontSize: (datum) => datum.fontSize,
|
|
77135
77544
|
fontStyle: (datum) => datum.fontStyle,
|
|
77136
|
-
fontWeight: (datum) => datum.fontWeight,
|
|
77137
77545
|
angle: (datum) => datum.angle,
|
|
77138
|
-
visible: datum => datum.visible
|
|
77546
|
+
visible: (datum) => datum.visible
|
|
77139
77547
|
}, 'normal', AttributeLevel.Series);
|
|
77140
77548
|
this.setMarkStyle(wordMark, {
|
|
77141
|
-
|
|
77142
|
-
|
|
77549
|
+
fill: (_b = (_a = wordSpec === null || wordSpec === void 0 ? void 0 : wordSpec.style) === null || _a === void 0 ? void 0 : _a.fill) !== null && _b !== void 0 ? _b : this.getWordColor,
|
|
77550
|
+
fontWeight: (datum) => datum.fontWeight,
|
|
77551
|
+
fontFamily: (datum) => datum.fontFamily
|
|
77143
77552
|
}, 'normal', AttributeLevel.User_Mark);
|
|
77144
77553
|
}
|
|
77145
77554
|
initTooltip() {
|
|
@@ -77233,7 +77642,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
77233
77642
|
? { field: this._spec.fontWeightField }
|
|
77234
77643
|
: this._valueField
|
|
77235
77644
|
? this._calculateFontWeight
|
|
77236
|
-
:
|
|
77645
|
+
: wordStyleSpec.fontWeight,
|
|
77237
77646
|
fontStyle: (_h = this._spec.fontStyleField) !== null && _h !== void 0 ? _h : wordStyleSpec.fontStyle
|
|
77238
77647
|
};
|
|
77239
77648
|
}
|
|
@@ -77243,9 +77652,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
77243
77652
|
}
|
|
77244
77653
|
_wordCloudShapeTransformOption() {
|
|
77245
77654
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
77246
|
-
const
|
|
77655
|
+
const fillingWordStyleSpec = (_b = (_a = this._spec.fillingWord) === null || _a === void 0 ? void 0 : _a.style) !== null && _b !== void 0 ? _b : {};
|
|
77247
77656
|
const wordCloudShapeConfig = (_c = this._wordCloudShapeConfig) !== null && _c !== void 0 ? _c : {};
|
|
77248
|
-
return Object.assign(Object.assign(Object.assign({}, wordCloudShapeConfig), this._getCommonTransformOptions()), { rotateList: this._rotateAngles, fillingRotateList: wordCloudShapeConfig.fillingRotateAngles, fillingFontFamily: (_e = (_d = wordCloudShapeConfig.fillingFontFamilyField) !== null && _d !== void 0 ? _d :
|
|
77657
|
+
return Object.assign(Object.assign(Object.assign({}, wordCloudShapeConfig), this._getCommonTransformOptions()), { rotateList: this._rotateAngles, fillingRotateList: wordCloudShapeConfig.fillingRotateAngles, fillingFontFamily: (_e = (_d = wordCloudShapeConfig.fillingFontFamilyField) !== null && _d !== void 0 ? _d : fillingWordStyleSpec.fontFamily) !== null && _e !== void 0 ? _e : this._defaultFontFamily, fillingPadding: (_g = (_f = this._spec.fillingWord) === null || _f === void 0 ? void 0 : _f.padding) !== null && _g !== void 0 ? _g : DEFAULT_FONT_PADDING, fillingFontStyle: (_h = wordCloudShapeConfig.fillingFontStyleField) !== null && _h !== void 0 ? _h : fillingWordStyleSpec.fontStyle, fillingFontWeight: (_j = wordCloudShapeConfig.fillingFontWeightField) !== null && _j !== void 0 ? _j : fillingWordStyleSpec.fontWeight });
|
|
77249
77658
|
}
|
|
77250
77659
|
getStatisticFields() {
|
|
77251
77660
|
const fields = [];
|
|
@@ -83104,6 +83513,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
83104
83513
|
targetField: this._spec.targetField,
|
|
83105
83514
|
valueField: this._spec.valueField,
|
|
83106
83515
|
direction: this.direction,
|
|
83516
|
+
crossNodeAlign: this._spec.crossNodeAlign,
|
|
83107
83517
|
nodeAlign: (_a = this._spec.nodeAlign) !== null && _a !== void 0 ? _a : 'justify',
|
|
83108
83518
|
nodeGap: (_b = this._spec.nodeGap) !== null && _b !== void 0 ? _b : 8,
|
|
83109
83519
|
nodeWidth: (_c = this._spec.nodeWidth) !== null && _c !== void 0 ? _c : 10,
|
|
@@ -84054,6 +84464,18 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
84054
84464
|
}
|
|
84055
84465
|
}
|
|
84056
84466
|
|
|
84467
|
+
class GaugePointerTooltipHelper extends BaseSeriesTooltipHelper {
|
|
84468
|
+
updateTooltipSpec() {
|
|
84469
|
+
var _a;
|
|
84470
|
+
super.updateTooltipSpec();
|
|
84471
|
+
if (isNil$1((_a = this.spec) === null || _a === void 0 ? void 0 : _a.dimension)) {
|
|
84472
|
+
this.spec = Object.assign(Object.assign({}, this.spec), { dimension: {
|
|
84473
|
+
visible: false
|
|
84474
|
+
} });
|
|
84475
|
+
}
|
|
84476
|
+
}
|
|
84477
|
+
}
|
|
84478
|
+
|
|
84057
84479
|
class GaugePointerSeries extends ProgressLikeSeries {
|
|
84058
84480
|
constructor() {
|
|
84059
84481
|
super(...arguments);
|
|
@@ -84124,7 +84546,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
84124
84546
|
}
|
|
84125
84547
|
}
|
|
84126
84548
|
initTooltip() {
|
|
84127
|
-
|
|
84549
|
+
this._tooltipHelper = new GaugePointerTooltipHelper(this);
|
|
84128
84550
|
this._pointerMark && this._tooltipHelper.activeTriggerSet.mark.add(this._pointerMark);
|
|
84129
84551
|
}
|
|
84130
84552
|
_getPointerAnchor(datum, markSpec) {
|
|
@@ -87949,7 +88371,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
87949
88371
|
|
|
87950
88372
|
class SankeyChartSpecTransformer extends BaseChartSpecTransformer {
|
|
87951
88373
|
_getDefaultSeriesSpec(spec) {
|
|
87952
|
-
const series = Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { categoryField: spec.categoryField, valueField: spec.valueField, sourceField: spec.sourceField, targetField: spec.targetField, direction: spec.direction, nodeAlign: spec.nodeAlign, nodeGap: spec.nodeGap, nodeWidth: spec.nodeWidth, linkWidth: spec.linkWidth, minStepWidth: spec.minStepWidth, minNodeHeight: spec.minNodeHeight, minLinkHeight: spec.minLinkHeight, dropIsolatedNode: spec.dropIsolatedNode, nodeHeight: spec.nodeHeight, linkHeight: spec.linkHeight, equalNodeHeight: spec.equalNodeHeight, linkOverlap: spec.linkOverlap, iterations: spec.iterations, nodeKey: spec.nodeKey, linkSortBy: spec.linkSortBy, nodeSortBy: spec.nodeSortBy, setNodeLayer: spec.setNodeLayer, node: spec.node, link: spec.link, label: spec.label, emphasis: spec.emphasis, inverse: spec.inverse });
|
|
88374
|
+
const series = Object.assign(Object.assign({}, super._getDefaultSeriesSpec(spec)), { categoryField: spec.categoryField, valueField: spec.valueField, sourceField: spec.sourceField, targetField: spec.targetField, direction: spec.direction, nodeAlign: spec.nodeAlign, crossNodeAlign: spec.crossNodeAlign, nodeGap: spec.nodeGap, nodeWidth: spec.nodeWidth, linkWidth: spec.linkWidth, minStepWidth: spec.minStepWidth, minNodeHeight: spec.minNodeHeight, minLinkHeight: spec.minLinkHeight, dropIsolatedNode: spec.dropIsolatedNode, nodeHeight: spec.nodeHeight, linkHeight: spec.linkHeight, equalNodeHeight: spec.equalNodeHeight, linkOverlap: spec.linkOverlap, iterations: spec.iterations, nodeKey: spec.nodeKey, linkSortBy: spec.linkSortBy, nodeSortBy: spec.nodeSortBy, setNodeLayer: spec.setNodeLayer, node: spec.node, link: spec.link, label: spec.label, emphasis: spec.emphasis, inverse: spec.inverse });
|
|
87953
88375
|
const seriesType = this.seriesType;
|
|
87954
88376
|
if (seriesType) {
|
|
87955
88377
|
series.type = seriesType;
|
|
@@ -89829,9 +90251,8 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89829
90251
|
this._cacheActualTooltip.content = (_d = (_c = pattern.updateContent) === null || _c === void 0 ? void 0 : _c.call(pattern, content, data, params)) !== null && _d !== void 0 ? _d : content;
|
|
89830
90252
|
}
|
|
89831
90253
|
}
|
|
89832
|
-
shouldHandleTooltip(params,
|
|
90254
|
+
shouldHandleTooltip(params, info) {
|
|
89833
90255
|
var _a, _b;
|
|
89834
|
-
const { tooltipInfo: info } = mouseEventData;
|
|
89835
90256
|
if (isNil$1(info)) {
|
|
89836
90257
|
return false;
|
|
89837
90258
|
}
|
|
@@ -89910,14 +90331,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89910
90331
|
return targetDimensionInfo;
|
|
89911
90332
|
}
|
|
89912
90333
|
getMouseEventData(params) {
|
|
89913
|
-
var _a;
|
|
89914
90334
|
return {
|
|
89915
90335
|
tooltipInfo: this._getDimensionInfo(params),
|
|
89916
|
-
ignore:
|
|
89917
|
-
var _a;
|
|
89918
|
-
const ignoreTriggers = (_a = model.tooltipHelper) === null || _a === void 0 ? void 0 : _a.ignoreTriggerSet.dimension;
|
|
89919
|
-
return (params.model && (ignoreTriggers === null || ignoreTriggers === void 0 ? void 0 : ignoreTriggers.has(params.model))) || (params.mark && (ignoreTriggers === null || ignoreTriggers === void 0 ? void 0 : ignoreTriggers.has(params.mark)));
|
|
89920
|
-
})
|
|
90336
|
+
ignore: false
|
|
89921
90337
|
};
|
|
89922
90338
|
}
|
|
89923
90339
|
}
|
|
@@ -89974,12 +90390,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89974
90390
|
getMouseEventData(params) {
|
|
89975
90391
|
var _a, _b;
|
|
89976
90392
|
let info;
|
|
89977
|
-
let ignore;
|
|
89978
90393
|
if (((_a = params.model) === null || _a === void 0 ? void 0 : _a.modelType) === 'series') {
|
|
89979
90394
|
const series = params.model;
|
|
89980
90395
|
const helper = series.tooltipHelper;
|
|
89981
90396
|
const activeTriggers = helper === null || helper === void 0 ? void 0 : helper.activeTriggerSet.group;
|
|
89982
|
-
const ignoreTriggers = helper === null || helper === void 0 ? void 0 : helper.ignoreTriggerSet.group;
|
|
89983
90397
|
if ((activeTriggers === null || activeTriggers === void 0 ? void 0 : activeTriggers.has(params.model)) || (activeTriggers === null || activeTriggers === void 0 ? void 0 : activeTriggers.has(params.mark))) {
|
|
89984
90398
|
const patternSpec = this.component.getSpec()[this.activeType];
|
|
89985
90399
|
const triggerMark = (patternSpec === null || patternSpec === void 0 ? void 0 : patternSpec.triggerMark) ? array(patternSpec.triggerMark) : [];
|
|
@@ -89991,13 +90405,10 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
89991
90405
|
};
|
|
89992
90406
|
}
|
|
89993
90407
|
}
|
|
89994
|
-
else if ((ignoreTriggers === null || ignoreTriggers === void 0 ? void 0 : ignoreTriggers.has(params.model)) || (ignoreTriggers === null || ignoreTriggers === void 0 ? void 0 : ignoreTriggers.has(params.mark))) {
|
|
89995
|
-
ignore = true;
|
|
89996
|
-
}
|
|
89997
90408
|
}
|
|
89998
90409
|
return {
|
|
89999
90410
|
tooltipInfo: info,
|
|
90000
|
-
ignore
|
|
90411
|
+
ignore: false
|
|
90001
90412
|
};
|
|
90002
90413
|
}
|
|
90003
90414
|
_getGroupDatum(params) {
|
|
@@ -90158,9 +90569,6 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
90158
90569
|
if (ignoreMark && isMarkInfo(this._cacheInfo)) {
|
|
90159
90570
|
success.mark = this._showTooltipByMouseEvent('mark', mouseEventData, params, isClick, true);
|
|
90160
90571
|
}
|
|
90161
|
-
else if (ignoreDimension && isDimensionInfo(this._cacheInfo)) {
|
|
90162
|
-
success.dimension = this._showTooltipByMouseEvent('dimension', mouseEventData, params, isClick, true);
|
|
90163
|
-
}
|
|
90164
90572
|
else if (isValid$1(dimensionInfo)) {
|
|
90165
90573
|
success.dimension = this._showTooltipByMouseEvent('dimension', mouseEventData, params, isClick);
|
|
90166
90574
|
}
|
|
@@ -90172,10 +90580,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
90172
90580
|
this._showTooltipByMouseEvent = (activeType, mouseEventData, params, isClick, useCache) => {
|
|
90173
90581
|
var _a;
|
|
90174
90582
|
const processor = this.processor[activeType];
|
|
90175
|
-
if (!processor.shouldHandleTooltip(params, {
|
|
90176
|
-
tooltipInfo: mouseEventData.tooltipInfo[activeType],
|
|
90177
|
-
ignore: mouseEventData.ignore[activeType]
|
|
90178
|
-
})) {
|
|
90583
|
+
if (!processor.shouldHandleTooltip(params, mouseEventData.tooltipInfo[activeType])) {
|
|
90179
90584
|
return false;
|
|
90180
90585
|
}
|
|
90181
90586
|
if (this._timer) {
|
|
@@ -91461,11 +91866,24 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
91461
91866
|
}
|
|
91462
91867
|
_parseFieldInfo() {
|
|
91463
91868
|
const { xField, yField } = this._spec;
|
|
91464
|
-
|
|
91465
|
-
|
|
91869
|
+
this._parseAndSetCrosshair(xField, 'x');
|
|
91870
|
+
this._parseAndSetCrosshair(yField, 'y');
|
|
91871
|
+
}
|
|
91872
|
+
_parseAndSetCrosshair(field, axis) {
|
|
91873
|
+
const hairProp = `_${axis}Hair`;
|
|
91874
|
+
const crosshairProp = `_${axis}Crosshair`;
|
|
91875
|
+
if (field && field.visible) {
|
|
91876
|
+
this[hairProp] = this._parseField(field, `${axis}Field`);
|
|
91877
|
+
if (this[crosshairProp]) {
|
|
91878
|
+
const { style, type } = this[hairProp];
|
|
91879
|
+
const styleKey = type === 'rect' ? 'rectStyle' : 'lineStyle';
|
|
91880
|
+
this[crosshairProp].setAttributes({
|
|
91881
|
+
[styleKey]: style
|
|
91882
|
+
});
|
|
91883
|
+
}
|
|
91466
91884
|
}
|
|
91467
|
-
if (
|
|
91468
|
-
this.
|
|
91885
|
+
else if (this[crosshairProp] && this[crosshairProp].parent) {
|
|
91886
|
+
this[crosshairProp].parent.removeChild(this[crosshairProp]);
|
|
91469
91887
|
}
|
|
91470
91888
|
}
|
|
91471
91889
|
_updateCrosshair(dim, type, attributes) {
|
|
@@ -92015,7 +92433,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92015
92433
|
});
|
|
92016
92434
|
let filter = null;
|
|
92017
92435
|
if (isContinuous()) {
|
|
92018
|
-
filter = (d) => d[datumField] >= newDomain[0] && d[datumField] <= newDomain
|
|
92436
|
+
filter = (d) => d[datumField] >= newDomain[0] && d[datumField] <= last(newDomain);
|
|
92019
92437
|
}
|
|
92020
92438
|
else {
|
|
92021
92439
|
filter = (d) => {
|
|
@@ -92513,15 +92931,15 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92513
92931
|
const domain = scale.domain();
|
|
92514
92932
|
if (isContinuous(scale.type)) {
|
|
92515
92933
|
if (this._isReverse()) {
|
|
92516
|
-
return domain[0] + (domain
|
|
92934
|
+
return domain[0] + (last(domain) - domain[0]) * (1 - state);
|
|
92517
92935
|
}
|
|
92518
|
-
return domain[0] + (domain
|
|
92936
|
+
return domain[0] + (last(domain) - domain[0]) * state;
|
|
92519
92937
|
}
|
|
92520
92938
|
let range = scale.range();
|
|
92521
92939
|
if (this._isReverse()) {
|
|
92522
92940
|
range = range.slice().reverse();
|
|
92523
92941
|
}
|
|
92524
|
-
const posInRange = range[0] + (range
|
|
92942
|
+
const posInRange = range[0] + (last(range) - range[0]) * state;
|
|
92525
92943
|
return scale.invert(posInRange);
|
|
92526
92944
|
}
|
|
92527
92945
|
dataToStatePoint(data) {
|
|
@@ -92531,7 +92949,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92531
92949
|
if (!this._isHorizontal && isContinuous(scale.type)) {
|
|
92532
92950
|
range = range.slice().reverse();
|
|
92533
92951
|
}
|
|
92534
|
-
return (pos - range[0]) / (range
|
|
92952
|
+
return (pos - range[0]) / (last(range) - range[0]);
|
|
92535
92953
|
}
|
|
92536
92954
|
_modeCheck(statePoint, mode) {
|
|
92537
92955
|
if (statePoint === 'start') {
|
|
@@ -92565,12 +92983,12 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
92565
92983
|
this._end = end;
|
|
92566
92984
|
this._minSpan = (_a = this._spec.minSpan) !== null && _a !== void 0 ? _a : 0;
|
|
92567
92985
|
this._maxSpan = (_b = this._spec.maxSpan) !== null && _b !== void 0 ? _b : 1;
|
|
92568
|
-
if (isContinuous(this._stateScale.type) && this._stateScale.domain()[0] !== this._stateScale.domain()
|
|
92986
|
+
if (isContinuous(this._stateScale.type) && this._stateScale.domain()[0] !== last(this._stateScale.domain())) {
|
|
92569
92987
|
if (this._spec.minValueSpan) {
|
|
92570
|
-
this._minSpan = this._spec.minValueSpan / (this._stateScale.domain()
|
|
92988
|
+
this._minSpan = this._spec.minValueSpan / (last(this._stateScale.domain()) - this._stateScale.domain()[0]);
|
|
92571
92989
|
}
|
|
92572
92990
|
if (this._spec.maxValueSpan) {
|
|
92573
|
-
this._maxSpan = this._spec.maxValueSpan / (this._stateScale.domain()
|
|
92991
|
+
this._maxSpan = this._spec.maxValueSpan / (last(this._stateScale.domain()) - this._stateScale.domain()[0]);
|
|
92574
92992
|
}
|
|
92575
92993
|
}
|
|
92576
92994
|
this._minSpan = Math.max(0, this._minSpan);
|
|
@@ -93042,7 +93460,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
93042
93460
|
return false;
|
|
93043
93461
|
}
|
|
93044
93462
|
const domain = scale.domain();
|
|
93045
|
-
if (isContinuous(scale.type) && domain[0] === domain
|
|
93463
|
+
if (isContinuous(scale.type) && domain[0] === last(domain)) {
|
|
93046
93464
|
return false;
|
|
93047
93465
|
}
|
|
93048
93466
|
if (isDiscrete(scale.type) && uniqArray(domain).length === 1) {
|
|
@@ -96019,6 +96437,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
96019
96437
|
});
|
|
96020
96438
|
if (component) {
|
|
96021
96439
|
component.setSkipBeforeLayouted(true);
|
|
96440
|
+
if (regionLabelInfo[0] && isValid$1(regionLabelInfo[0].labelSpec.zIndex)) {
|
|
96441
|
+
component.setZIndex(regionLabelInfo[0].labelSpec.zIndex);
|
|
96442
|
+
}
|
|
96022
96443
|
this._marks.addMark(component);
|
|
96023
96444
|
this._labelComponentMap.set(component, () => {
|
|
96024
96445
|
return this._labelInfoMap.get(region);
|
|
@@ -96033,6 +96454,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
96033
96454
|
support3d: labelInfo.baseMark.getSupport3d()
|
|
96034
96455
|
});
|
|
96035
96456
|
if (component) {
|
|
96457
|
+
if (isValid$1(labelInfo.labelSpec.zIndex)) {
|
|
96458
|
+
component.setZIndex(labelInfo.labelSpec.zIndex);
|
|
96459
|
+
}
|
|
96036
96460
|
component.setSkipBeforeLayouted(true);
|
|
96037
96461
|
this._marks.addMark(component);
|
|
96038
96462
|
this._labelComponentMap.set(component, () => {
|
|
@@ -96993,13 +97417,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
96993
97417
|
else {
|
|
96994
97418
|
const range = axis.getScale().range();
|
|
96995
97419
|
const rangeFactor = (_b = axis.getScale().rangeFactor()) !== null && _b !== void 0 ? _b : [0, 1];
|
|
96996
|
-
const isAxisReverse = range
|
|
97420
|
+
const isAxisReverse = last(range) < range[0];
|
|
96997
97421
|
const startPosTemp = boundsStart - region.getLayoutStartPoint()[regionStartAttr];
|
|
96998
97422
|
const endPosTemp = boundsEnd - region.getLayoutStartPoint()[regionStartAttr];
|
|
96999
97423
|
const endPos = isAxisReverse ? Math.min(startPosTemp, endPosTemp) : Math.max(startPosTemp, endPosTemp);
|
|
97000
97424
|
const startPos = isAxisReverse ? Math.max(startPosTemp, endPosTemp) : Math.min(startPosTemp, endPosTemp);
|
|
97001
|
-
const start = ((startPos - range[0]) / (range
|
|
97002
|
-
const end = ((endPos - range[0]) / (range
|
|
97425
|
+
const start = ((startPos - range[0]) / (last(range) - range[0])) * (rangeFactor[1] - rangeFactor[0]) + rangeFactor[0];
|
|
97426
|
+
const end = ((endPos - range[0]) / (last(range) - range[0])) * (rangeFactor[1] - rangeFactor[0]) + rangeFactor[0];
|
|
97003
97427
|
const newStart = this._stateClamp(start - axisRangeExpand);
|
|
97004
97428
|
const newEnd = this._stateClamp(end + axisRangeExpand);
|
|
97005
97429
|
axis.getScale().rangeFactor([newStart, newEnd]);
|
|
@@ -97314,7 +97738,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
97314
97738
|
product.addEventListener(HOOK_EVENT.AFTER_ELEMENT_ENCODE, () => {
|
|
97315
97739
|
if (this._isLayout === false) {
|
|
97316
97740
|
const component = product.getGroupGraphicItem();
|
|
97317
|
-
if (component.listenerCount('*') === 0) {
|
|
97741
|
+
if ((component === null || component === void 0 ? void 0 : component.listenerCount('*')) === 0) {
|
|
97318
97742
|
component.addEventListener('*', ((event, type) => this._delegateEvent(component, event, type)));
|
|
97319
97743
|
}
|
|
97320
97744
|
}
|