@visactor/vchart 2.0.23-alpha.6 → 2.0.23-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/es5/index.js +1 -1
- package/build/index.es.js +59 -39
- package/build/index.js +59 -39
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/animation/index.js +2 -1
- package/cjs/chart/base/base-chart.js +7 -13
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/chart/radar/radar-transformer.js +4 -4
- package/cjs/chart/radar/radar-transformer.js.map +1 -1
- package/cjs/compile/state-manager.js +1 -2
- package/cjs/component/marker/mark-line/cartesian-mark-line.js +7 -18
- package/cjs/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/cjs/component/marker/mark-line/interface/spec.d.ts +2 -9
- package/cjs/component/marker/mark-line/interface/spec.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/interaction/triggers/element-active.js +1 -2
- package/cjs/interaction/triggers/element-active.js.map +1 -1
- package/cjs/series/bar/bar.js +1 -1
- package/cjs/series/bar/bar.js.map +1 -1
- package/cjs/series/scatter/scatter.d.ts +3 -0
- package/cjs/series/scatter/scatter.js +24 -6
- package/cjs/series/scatter/scatter.js.map +1 -1
- package/esm/animation/index.js +2 -1
- package/esm/chart/base/base-chart.js +7 -12
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/chart/radar/radar-transformer.js +4 -4
- package/esm/chart/radar/radar-transformer.js.map +1 -1
- package/esm/compile/state-manager.js +1 -2
- package/esm/component/marker/mark-line/cartesian-mark-line.js +8 -18
- package/esm/component/marker/mark-line/cartesian-mark-line.js.map +1 -1
- package/esm/component/marker/mark-line/interface/spec.d.ts +2 -9
- package/esm/component/marker/mark-line/interface/spec.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/interaction/triggers/element-active.js +1 -2
- package/esm/interaction/triggers/element-active.js.map +1 -1
- package/esm/series/bar/bar.js +1 -1
- package/esm/series/bar/bar.js.map +1 -1
- package/esm/series/scatter/scatter.d.ts +3 -0
- package/esm/series/scatter/scatter.js +27 -5
- package/esm/series/scatter/scatter.js.map +1 -1
- package/package.json +5 -5
package/build/index.es.js
CHANGED
|
@@ -62179,7 +62179,7 @@ const lookup = (data, opt) => {
|
|
|
62179
62179
|
});
|
|
62180
62180
|
};
|
|
62181
62181
|
|
|
62182
|
-
const version = "2.0.
|
|
62182
|
+
const version = "2.0.23-alpha.5";
|
|
62183
62183
|
|
|
62184
62184
|
const addVChartProperty = (data, op) => {
|
|
62185
62185
|
const context = op.beforeCall();
|
|
@@ -70221,24 +70221,21 @@ class BaseChart extends CompilableBase {
|
|
|
70221
70221
|
this._interaction = new Interaction();
|
|
70222
70222
|
const series = this.getAllSeries();
|
|
70223
70223
|
const mergedTriggers = [];
|
|
70224
|
-
const
|
|
70224
|
+
const mergedTriggersMarks = {};
|
|
70225
70225
|
series.forEach(s => {
|
|
70226
70226
|
const triggers = s.getInteractionTriggers();
|
|
70227
70227
|
if (triggers && triggers.length) {
|
|
70228
70228
|
const regionId = s.getRegion().id;
|
|
70229
70229
|
triggers.forEach(({ trigger, marks }) => {
|
|
70230
|
-
const
|
|
70231
|
-
if (
|
|
70232
|
-
|
|
70230
|
+
const interactionId = `${regionId}-${trigger.type}`;
|
|
70231
|
+
if (mergedTriggersMarks[interactionId]) {
|
|
70232
|
+
marks.forEach(m => {
|
|
70233
|
+
mergedTriggersMarks[interactionId].marks.push(m);
|
|
70234
|
+
});
|
|
70233
70235
|
}
|
|
70234
70236
|
else {
|
|
70235
|
-
|
|
70236
|
-
|
|
70237
|
-
regionId,
|
|
70238
|
-
config: Object.assign({}, trigger),
|
|
70239
|
-
trigger: mergedTrigger
|
|
70240
|
-
});
|
|
70241
|
-
mergedTriggers.push(mergedTrigger);
|
|
70237
|
+
mergedTriggersMarks[interactionId] = Object.assign(Object.assign({}, trigger), { marks });
|
|
70238
|
+
mergedTriggers.push(mergedTriggersMarks[interactionId]);
|
|
70242
70239
|
}
|
|
70243
70240
|
});
|
|
70244
70241
|
}
|
|
@@ -73679,7 +73676,7 @@ class BarSeries extends CartesianSeries {
|
|
|
73679
73676
|
const fieldsX = this._fieldX;
|
|
73680
73677
|
this._data.setTransform([
|
|
73681
73678
|
{
|
|
73682
|
-
type: '
|
|
73679
|
+
type: 'dataSampling',
|
|
73683
73680
|
size: this._direction === "horizontal" ? height : width,
|
|
73684
73681
|
factor: this._spec.samplingFactor,
|
|
73685
73682
|
yfield: this._direction === "horizontal" ? fieldsX[0] : fieldsY[0],
|
|
@@ -74010,6 +74007,10 @@ class ScatterSeries extends CartesianSeries {
|
|
|
74010
74007
|
if (this._symbolMark.getProduct()) {
|
|
74011
74008
|
this._symbolMark.compileEncode();
|
|
74012
74009
|
}
|
|
74010
|
+
if (this._isGeoCoordinateSeries()) {
|
|
74011
|
+
this._updateSymbolGraphicPosition();
|
|
74012
|
+
this._refreshLabelComponent(true, true);
|
|
74013
|
+
}
|
|
74013
74014
|
}
|
|
74014
74015
|
initLabelMarkStyle(labelMark) {
|
|
74015
74016
|
if (!labelMark) {
|
|
@@ -74057,6 +74058,38 @@ class ScatterSeries extends CartesianSeries {
|
|
|
74057
74058
|
}
|
|
74058
74059
|
return labelGraphic;
|
|
74059
74060
|
}
|
|
74061
|
+
_isGeoCoordinateSeries() {
|
|
74062
|
+
var _a, _b;
|
|
74063
|
+
return ((_b = (_a = this.getXAxisHelper()) === null || _a === void 0 ? void 0 : _a.getAxisType) === null || _b === void 0 ? void 0 : _b.call(_a)) === ComponentTypeEnum.geoCoordinate;
|
|
74064
|
+
}
|
|
74065
|
+
_refreshLabelComponent(resetPostMatrix = false, disableAnimation = false) {
|
|
74066
|
+
var _a, _b;
|
|
74067
|
+
const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
|
|
74068
|
+
const labelGraphic = (_b = vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.getComponent) === null || _b === void 0 ? void 0 : _b.call(vgrammarLabel);
|
|
74069
|
+
if (resetPostMatrix) {
|
|
74070
|
+
if (labelGraphic === null || labelGraphic === void 0 ? void 0 : labelGraphic.attribute.postMatrix) {
|
|
74071
|
+
labelGraphic.setAttributes({
|
|
74072
|
+
postMatrix: new Matrix()
|
|
74073
|
+
});
|
|
74074
|
+
}
|
|
74075
|
+
}
|
|
74076
|
+
if (disableAnimation && (labelGraphic === null || labelGraphic === void 0 ? void 0 : labelGraphic.disableAnimation)) {
|
|
74077
|
+
labelGraphic.disableAnimation();
|
|
74078
|
+
if (!this._enableLabelAnimationHook) {
|
|
74079
|
+
this._enableLabelAnimationHook = () => {
|
|
74080
|
+
var _a, _b, _c, _d;
|
|
74081
|
+
const currentLabelGraphic = (_c = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getComponent) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
74082
|
+
(_d = currentLabelGraphic === null || currentLabelGraphic === void 0 ? void 0 : currentLabelGraphic.enableAnimation) === null || _d === void 0 ? void 0 : _d.call(currentLabelGraphic);
|
|
74083
|
+
this.event.off(HOOK_EVENT.AFTER_MARK_RENDER_END, this._enableLabelAnimationHook);
|
|
74084
|
+
this._enableLabelAnimationHook = undefined;
|
|
74085
|
+
};
|
|
74086
|
+
this.event.on(HOOK_EVENT.AFTER_MARK_RENDER_END, this._enableLabelAnimationHook);
|
|
74087
|
+
}
|
|
74088
|
+
}
|
|
74089
|
+
if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.getProduct()) {
|
|
74090
|
+
vgrammarLabel.renderInner();
|
|
74091
|
+
}
|
|
74092
|
+
}
|
|
74060
74093
|
handleZoom(e) {
|
|
74061
74094
|
const { scale, scaleCenter } = e;
|
|
74062
74095
|
if (scale === 1) {
|
|
@@ -74080,7 +74113,7 @@ class ScatterSeries extends CartesianSeries {
|
|
|
74080
74113
|
}
|
|
74081
74114
|
}
|
|
74082
74115
|
onLayoutEnd() {
|
|
74083
|
-
var _a, _b
|
|
74116
|
+
var _a, _b;
|
|
74084
74117
|
super.onLayoutEnd();
|
|
74085
74118
|
this._updateSymbolGraphicPosition();
|
|
74086
74119
|
const labelGraphic = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getComponent();
|
|
@@ -74089,10 +74122,7 @@ class ScatterSeries extends CartesianSeries {
|
|
|
74089
74122
|
postMatrix: new Matrix()
|
|
74090
74123
|
});
|
|
74091
74124
|
}
|
|
74092
|
-
|
|
74093
|
-
if (vgrammarLabel) {
|
|
74094
|
-
vgrammarLabel.renderInner();
|
|
74095
|
-
}
|
|
74125
|
+
this._refreshLabelComponent();
|
|
74096
74126
|
}
|
|
74097
74127
|
getDefaultShapeType() {
|
|
74098
74128
|
return 'circle';
|
|
@@ -93839,17 +93869,16 @@ const registerRoseChart = () => {
|
|
|
93839
93869
|
|
|
93840
93870
|
class RadarChartSpecTransformer extends RoseLikeChartSpecTransformer {
|
|
93841
93871
|
_getDefaultSeriesSpec(spec) {
|
|
93842
|
-
var _a
|
|
93872
|
+
var _a;
|
|
93843
93873
|
const series = super._getDefaultSeriesSpec(spec);
|
|
93844
|
-
const areaTheme = (_b = (_a = this._option).getTheme) === null || _b === void 0 ? void 0 : _b.call(_a, 'series', 'radar', 'area');
|
|
93845
93874
|
series.line = spec.line;
|
|
93846
93875
|
series.point = spec.point;
|
|
93847
93876
|
series.stack = spec.stack;
|
|
93848
93877
|
series.percent = spec.percent;
|
|
93849
93878
|
series.area = mergeSpec({
|
|
93850
|
-
visible:
|
|
93879
|
+
visible: false
|
|
93851
93880
|
}, spec.area);
|
|
93852
|
-
series.seriesMark = (
|
|
93881
|
+
series.seriesMark = (_a = spec.seriesMark) !== null && _a !== void 0 ? _a : 'area';
|
|
93853
93882
|
series.activePoint = spec.activePoint;
|
|
93854
93883
|
series.pointDis = spec.pointDis;
|
|
93855
93884
|
series.pointDisMul = spec.pointDisMul;
|
|
@@ -101674,23 +101703,13 @@ class CartesianMarkLine extends BaseMarkLine {
|
|
|
101674
101703
|
return { points };
|
|
101675
101704
|
}
|
|
101676
101705
|
_markerLayout() {
|
|
101677
|
-
var _a, _b, _c, _d, _e
|
|
101706
|
+
var _a, _b, _c, _d, _e;
|
|
101678
101707
|
const updateAttrs = this._getUpdateMarkerAttrs();
|
|
101679
101708
|
if (this._spec.type === 'type-step') {
|
|
101680
101709
|
const startRelativeSeries = this._startRelativeSeries;
|
|
101681
101710
|
const endRelativeSeries = this._endRelativeSeries;
|
|
101682
101711
|
const { multiSegment, mainSegmentIndex } = this._spec.line || {};
|
|
101683
|
-
const { connectDirection } = this._spec;
|
|
101684
|
-
let { expandDistance = 0 } = this._spec;
|
|
101685
|
-
const { points, limitRect } = updateAttrs;
|
|
101686
|
-
const coordinatePoints = array(points).filter(Boolean);
|
|
101687
|
-
if (isFunction$1(expandDistance)) {
|
|
101688
|
-
const startRegion = (_a = startRelativeSeries === null || startRelativeSeries === void 0 ? void 0 : startRelativeSeries.getRegion) === null || _a === void 0 ? void 0 : _a.call(startRelativeSeries);
|
|
101689
|
-
const endRegion = (_b = endRelativeSeries === null || endRelativeSeries === void 0 ? void 0 : endRelativeSeries.getRegion) === null || _b === void 0 ? void 0 : _b.call(endRelativeSeries);
|
|
101690
|
-
expandDistance = expandDistance(this._markerData, Object.assign(Object.assign({}, this.getMarkAttributeContext()), { region: (_d = (_c = this._relativeSeries) === null || _c === void 0 ? void 0 : _c.getRegion) === null || _d === void 0 ? void 0 : _d.call(_c), startRegion,
|
|
101691
|
-
endRegion,
|
|
101692
|
-
coordinatePoints }));
|
|
101693
|
-
}
|
|
101712
|
+
const { connectDirection, expandDistance = 0 } = this._spec;
|
|
101694
101713
|
let expandDistanceValue;
|
|
101695
101714
|
if (isPercent(expandDistance)) {
|
|
101696
101715
|
const regionStart = startRelativeSeries.getRegion();
|
|
@@ -101711,8 +101730,9 @@ class CartesianMarkLine extends BaseMarkLine {
|
|
|
101711
101730
|
else {
|
|
101712
101731
|
expandDistanceValue = expandDistance;
|
|
101713
101732
|
}
|
|
101733
|
+
const { points, limitRect } = updateAttrs;
|
|
101714
101734
|
if (!points || points.length < 2) {
|
|
101715
|
-
(
|
|
101735
|
+
(_a = this._markerComponent) === null || _a === void 0 ? void 0 : _a.setAttributes(updateAttrs);
|
|
101716
101736
|
return;
|
|
101717
101737
|
}
|
|
101718
101738
|
const joinPoints = getInsertPoints(points[0], points[1], connectDirection, expandDistanceValue);
|
|
@@ -101726,11 +101746,11 @@ class CartesianMarkLine extends BaseMarkLine {
|
|
|
101726
101746
|
else {
|
|
101727
101747
|
labelPositionAttrs = Object.assign({ position: 'start', autoRotate: false }, getTextOffset(points[0], points[1], connectDirection, expandDistanceValue));
|
|
101728
101748
|
}
|
|
101729
|
-
const markerComponentAttr = (
|
|
101749
|
+
const markerComponentAttr = (_c = (_b = this._markerComponent) === null || _b === void 0 ? void 0 : _b.attribute) !== null && _c !== void 0 ? _c : {};
|
|
101730
101750
|
const prevLabelAttrs = array(markerComponentAttr.label);
|
|
101731
101751
|
const updateLabels = array(updateAttrs.label);
|
|
101732
101752
|
const labelsInSpec = array(this._spec.label);
|
|
101733
|
-
(
|
|
101753
|
+
(_d = this._markerComponent) === null || _d === void 0 ? void 0 : _d.setAttributes({
|
|
101734
101754
|
points: multiSegment
|
|
101735
101755
|
? [
|
|
101736
101756
|
[joinPoints[0], joinPoints[1]],
|
|
@@ -101770,7 +101790,7 @@ class CartesianMarkLine extends BaseMarkLine {
|
|
|
101770
101790
|
});
|
|
101771
101791
|
}
|
|
101772
101792
|
else {
|
|
101773
|
-
(
|
|
101793
|
+
(_e = this._markerComponent) === null || _e === void 0 ? void 0 : _e.setAttributes(updateAttrs);
|
|
101774
101794
|
}
|
|
101775
101795
|
}
|
|
101776
101796
|
_computeOptions() {
|
|
@@ -106359,7 +106379,7 @@ class ElementActive extends BaseTrigger {
|
|
|
106359
106379
|
const { interaction, state } = this.options;
|
|
106360
106380
|
const statedGraphics = interaction.getStatedGraphics(this);
|
|
106361
106381
|
const g = graphic !== null && graphic !== void 0 ? graphic : statedGraphics === null || statedGraphics === void 0 ? void 0 : statedGraphics[0];
|
|
106362
|
-
if (g &&
|
|
106382
|
+
if (g && statedGraphics.includes(g)) {
|
|
106363
106383
|
g.removeState(state);
|
|
106364
106384
|
interaction.setStatedGraphics(this, statedGraphics.filter(sg => sg !== g));
|
|
106365
106385
|
}
|
package/build/index.js
CHANGED
|
@@ -62185,7 +62185,7 @@
|
|
|
62185
62185
|
});
|
|
62186
62186
|
};
|
|
62187
62187
|
|
|
62188
|
-
const version = "2.0.
|
|
62188
|
+
const version = "2.0.23-alpha.5";
|
|
62189
62189
|
|
|
62190
62190
|
const addVChartProperty = (data, op) => {
|
|
62191
62191
|
const context = op.beforeCall();
|
|
@@ -70227,24 +70227,21 @@
|
|
|
70227
70227
|
this._interaction = new Interaction();
|
|
70228
70228
|
const series = this.getAllSeries();
|
|
70229
70229
|
const mergedTriggers = [];
|
|
70230
|
-
const
|
|
70230
|
+
const mergedTriggersMarks = {};
|
|
70231
70231
|
series.forEach(s => {
|
|
70232
70232
|
const triggers = s.getInteractionTriggers();
|
|
70233
70233
|
if (triggers && triggers.length) {
|
|
70234
70234
|
const regionId = s.getRegion().id;
|
|
70235
70235
|
triggers.forEach(({ trigger, marks }) => {
|
|
70236
|
-
const
|
|
70237
|
-
if (
|
|
70238
|
-
|
|
70236
|
+
const interactionId = `${regionId}-${trigger.type}`;
|
|
70237
|
+
if (mergedTriggersMarks[interactionId]) {
|
|
70238
|
+
marks.forEach(m => {
|
|
70239
|
+
mergedTriggersMarks[interactionId].marks.push(m);
|
|
70240
|
+
});
|
|
70239
70241
|
}
|
|
70240
70242
|
else {
|
|
70241
|
-
|
|
70242
|
-
|
|
70243
|
-
regionId,
|
|
70244
|
-
config: Object.assign({}, trigger),
|
|
70245
|
-
trigger: mergedTrigger
|
|
70246
|
-
});
|
|
70247
|
-
mergedTriggers.push(mergedTrigger);
|
|
70243
|
+
mergedTriggersMarks[interactionId] = Object.assign(Object.assign({}, trigger), { marks });
|
|
70244
|
+
mergedTriggers.push(mergedTriggersMarks[interactionId]);
|
|
70248
70245
|
}
|
|
70249
70246
|
});
|
|
70250
70247
|
}
|
|
@@ -73685,7 +73682,7 @@
|
|
|
73685
73682
|
const fieldsX = this._fieldX;
|
|
73686
73683
|
this._data.setTransform([
|
|
73687
73684
|
{
|
|
73688
|
-
type: '
|
|
73685
|
+
type: 'dataSampling',
|
|
73689
73686
|
size: this._direction === "horizontal" ? height : width,
|
|
73690
73687
|
factor: this._spec.samplingFactor,
|
|
73691
73688
|
yfield: this._direction === "horizontal" ? fieldsX[0] : fieldsY[0],
|
|
@@ -74016,6 +74013,10 @@
|
|
|
74016
74013
|
if (this._symbolMark.getProduct()) {
|
|
74017
74014
|
this._symbolMark.compileEncode();
|
|
74018
74015
|
}
|
|
74016
|
+
if (this._isGeoCoordinateSeries()) {
|
|
74017
|
+
this._updateSymbolGraphicPosition();
|
|
74018
|
+
this._refreshLabelComponent(true, true);
|
|
74019
|
+
}
|
|
74019
74020
|
}
|
|
74020
74021
|
initLabelMarkStyle(labelMark) {
|
|
74021
74022
|
if (!labelMark) {
|
|
@@ -74063,6 +74064,38 @@
|
|
|
74063
74064
|
}
|
|
74064
74065
|
return labelGraphic;
|
|
74065
74066
|
}
|
|
74067
|
+
_isGeoCoordinateSeries() {
|
|
74068
|
+
var _a, _b;
|
|
74069
|
+
return ((_b = (_a = this.getXAxisHelper()) === null || _a === void 0 ? void 0 : _a.getAxisType) === null || _b === void 0 ? void 0 : _b.call(_a)) === ComponentTypeEnum.geoCoordinate;
|
|
74070
|
+
}
|
|
74071
|
+
_refreshLabelComponent(resetPostMatrix = false, disableAnimation = false) {
|
|
74072
|
+
var _a, _b;
|
|
74073
|
+
const vgrammarLabel = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent();
|
|
74074
|
+
const labelGraphic = (_b = vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.getComponent) === null || _b === void 0 ? void 0 : _b.call(vgrammarLabel);
|
|
74075
|
+
if (resetPostMatrix) {
|
|
74076
|
+
if (labelGraphic === null || labelGraphic === void 0 ? void 0 : labelGraphic.attribute.postMatrix) {
|
|
74077
|
+
labelGraphic.setAttributes({
|
|
74078
|
+
postMatrix: new Matrix()
|
|
74079
|
+
});
|
|
74080
|
+
}
|
|
74081
|
+
}
|
|
74082
|
+
if (disableAnimation && (labelGraphic === null || labelGraphic === void 0 ? void 0 : labelGraphic.disableAnimation)) {
|
|
74083
|
+
labelGraphic.disableAnimation();
|
|
74084
|
+
if (!this._enableLabelAnimationHook) {
|
|
74085
|
+
this._enableLabelAnimationHook = () => {
|
|
74086
|
+
var _a, _b, _c, _d;
|
|
74087
|
+
const currentLabelGraphic = (_c = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getComponent) === null || _c === void 0 ? void 0 : _c.call(_b);
|
|
74088
|
+
(_d = currentLabelGraphic === null || currentLabelGraphic === void 0 ? void 0 : currentLabelGraphic.enableAnimation) === null || _d === void 0 ? void 0 : _d.call(currentLabelGraphic);
|
|
74089
|
+
this.event.off(HOOK_EVENT.AFTER_MARK_RENDER_END, this._enableLabelAnimationHook);
|
|
74090
|
+
this._enableLabelAnimationHook = undefined;
|
|
74091
|
+
};
|
|
74092
|
+
this.event.on(HOOK_EVENT.AFTER_MARK_RENDER_END, this._enableLabelAnimationHook);
|
|
74093
|
+
}
|
|
74094
|
+
}
|
|
74095
|
+
if (vgrammarLabel === null || vgrammarLabel === void 0 ? void 0 : vgrammarLabel.getProduct()) {
|
|
74096
|
+
vgrammarLabel.renderInner();
|
|
74097
|
+
}
|
|
74098
|
+
}
|
|
74066
74099
|
handleZoom(e) {
|
|
74067
74100
|
const { scale, scaleCenter } = e;
|
|
74068
74101
|
if (scale === 1) {
|
|
@@ -74086,7 +74119,7 @@
|
|
|
74086
74119
|
}
|
|
74087
74120
|
}
|
|
74088
74121
|
onLayoutEnd() {
|
|
74089
|
-
var _a, _b
|
|
74122
|
+
var _a, _b;
|
|
74090
74123
|
super.onLayoutEnd();
|
|
74091
74124
|
this._updateSymbolGraphicPosition();
|
|
74092
74125
|
const labelGraphic = (_b = (_a = this._labelMark) === null || _a === void 0 ? void 0 : _a.getComponent()) === null || _b === void 0 ? void 0 : _b.getComponent();
|
|
@@ -74095,10 +74128,7 @@
|
|
|
74095
74128
|
postMatrix: new Matrix()
|
|
74096
74129
|
});
|
|
74097
74130
|
}
|
|
74098
|
-
|
|
74099
|
-
if (vgrammarLabel) {
|
|
74100
|
-
vgrammarLabel.renderInner();
|
|
74101
|
-
}
|
|
74131
|
+
this._refreshLabelComponent();
|
|
74102
74132
|
}
|
|
74103
74133
|
getDefaultShapeType() {
|
|
74104
74134
|
return 'circle';
|
|
@@ -93845,17 +93875,16 @@
|
|
|
93845
93875
|
|
|
93846
93876
|
class RadarChartSpecTransformer extends RoseLikeChartSpecTransformer {
|
|
93847
93877
|
_getDefaultSeriesSpec(spec) {
|
|
93848
|
-
var _a
|
|
93878
|
+
var _a;
|
|
93849
93879
|
const series = super._getDefaultSeriesSpec(spec);
|
|
93850
|
-
const areaTheme = (_b = (_a = this._option).getTheme) === null || _b === void 0 ? void 0 : _b.call(_a, 'series', 'radar', 'area');
|
|
93851
93880
|
series.line = spec.line;
|
|
93852
93881
|
series.point = spec.point;
|
|
93853
93882
|
series.stack = spec.stack;
|
|
93854
93883
|
series.percent = spec.percent;
|
|
93855
93884
|
series.area = mergeSpec({
|
|
93856
|
-
visible:
|
|
93885
|
+
visible: false
|
|
93857
93886
|
}, spec.area);
|
|
93858
|
-
series.seriesMark = (
|
|
93887
|
+
series.seriesMark = (_a = spec.seriesMark) !== null && _a !== void 0 ? _a : 'area';
|
|
93859
93888
|
series.activePoint = spec.activePoint;
|
|
93860
93889
|
series.pointDis = spec.pointDis;
|
|
93861
93890
|
series.pointDisMul = spec.pointDisMul;
|
|
@@ -101680,23 +101709,13 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101680
101709
|
return { points };
|
|
101681
101710
|
}
|
|
101682
101711
|
_markerLayout() {
|
|
101683
|
-
var _a, _b, _c, _d, _e
|
|
101712
|
+
var _a, _b, _c, _d, _e;
|
|
101684
101713
|
const updateAttrs = this._getUpdateMarkerAttrs();
|
|
101685
101714
|
if (this._spec.type === 'type-step') {
|
|
101686
101715
|
const startRelativeSeries = this._startRelativeSeries;
|
|
101687
101716
|
const endRelativeSeries = this._endRelativeSeries;
|
|
101688
101717
|
const { multiSegment, mainSegmentIndex } = this._spec.line || {};
|
|
101689
|
-
const { connectDirection } = this._spec;
|
|
101690
|
-
let { expandDistance = 0 } = this._spec;
|
|
101691
|
-
const { points, limitRect } = updateAttrs;
|
|
101692
|
-
const coordinatePoints = array(points).filter(Boolean);
|
|
101693
|
-
if (isFunction$1(expandDistance)) {
|
|
101694
|
-
const startRegion = (_a = startRelativeSeries === null || startRelativeSeries === void 0 ? void 0 : startRelativeSeries.getRegion) === null || _a === void 0 ? void 0 : _a.call(startRelativeSeries);
|
|
101695
|
-
const endRegion = (_b = endRelativeSeries === null || endRelativeSeries === void 0 ? void 0 : endRelativeSeries.getRegion) === null || _b === void 0 ? void 0 : _b.call(endRelativeSeries);
|
|
101696
|
-
expandDistance = expandDistance(this._markerData, Object.assign(Object.assign({}, this.getMarkAttributeContext()), { region: (_d = (_c = this._relativeSeries) === null || _c === void 0 ? void 0 : _c.getRegion) === null || _d === void 0 ? void 0 : _d.call(_c), startRegion,
|
|
101697
|
-
endRegion,
|
|
101698
|
-
coordinatePoints }));
|
|
101699
|
-
}
|
|
101718
|
+
const { connectDirection, expandDistance = 0 } = this._spec;
|
|
101700
101719
|
let expandDistanceValue;
|
|
101701
101720
|
if (isPercent(expandDistance)) {
|
|
101702
101721
|
const regionStart = startRelativeSeries.getRegion();
|
|
@@ -101717,8 +101736,9 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101717
101736
|
else {
|
|
101718
101737
|
expandDistanceValue = expandDistance;
|
|
101719
101738
|
}
|
|
101739
|
+
const { points, limitRect } = updateAttrs;
|
|
101720
101740
|
if (!points || points.length < 2) {
|
|
101721
|
-
(
|
|
101741
|
+
(_a = this._markerComponent) === null || _a === void 0 ? void 0 : _a.setAttributes(updateAttrs);
|
|
101722
101742
|
return;
|
|
101723
101743
|
}
|
|
101724
101744
|
const joinPoints = getInsertPoints(points[0], points[1], connectDirection, expandDistanceValue);
|
|
@@ -101732,11 +101752,11 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101732
101752
|
else {
|
|
101733
101753
|
labelPositionAttrs = Object.assign({ position: 'start', autoRotate: false }, getTextOffset(points[0], points[1], connectDirection, expandDistanceValue));
|
|
101734
101754
|
}
|
|
101735
|
-
const markerComponentAttr = (
|
|
101755
|
+
const markerComponentAttr = (_c = (_b = this._markerComponent) === null || _b === void 0 ? void 0 : _b.attribute) !== null && _c !== void 0 ? _c : {};
|
|
101736
101756
|
const prevLabelAttrs = array(markerComponentAttr.label);
|
|
101737
101757
|
const updateLabels = array(updateAttrs.label);
|
|
101738
101758
|
const labelsInSpec = array(this._spec.label);
|
|
101739
|
-
(
|
|
101759
|
+
(_d = this._markerComponent) === null || _d === void 0 ? void 0 : _d.setAttributes({
|
|
101740
101760
|
points: multiSegment
|
|
101741
101761
|
? [
|
|
101742
101762
|
[joinPoints[0], joinPoints[1]],
|
|
@@ -101776,7 +101796,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
101776
101796
|
});
|
|
101777
101797
|
}
|
|
101778
101798
|
else {
|
|
101779
|
-
(
|
|
101799
|
+
(_e = this._markerComponent) === null || _e === void 0 ? void 0 : _e.setAttributes(updateAttrs);
|
|
101780
101800
|
}
|
|
101781
101801
|
}
|
|
101782
101802
|
_computeOptions() {
|
|
@@ -106365,7 +106385,7 @@ C0.3-1.4,0.3-1.4,0.3-1.4z;`;
|
|
|
106365
106385
|
const { interaction, state } = this.options;
|
|
106366
106386
|
const statedGraphics = interaction.getStatedGraphics(this);
|
|
106367
106387
|
const g = graphic !== null && graphic !== void 0 ? graphic : statedGraphics === null || statedGraphics === void 0 ? void 0 : statedGraphics[0];
|
|
106368
|
-
if (g &&
|
|
106388
|
+
if (g && statedGraphics.includes(g)) {
|
|
106369
106389
|
g.removeState(state);
|
|
106370
106390
|
interaction.setStatedGraphics(this, statedGraphics.filter(sg => sg !== g));
|
|
106371
106391
|
}
|