@visactor/vchart 1.2.1 → 1.2.2-alpha.0
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.js +85 -25
- package/build/index.min.js +1 -1
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/area/area.js +2 -1
- package/cjs/chart/area/area.js.map +1 -1
- package/cjs/chart/line/line.js +2 -1
- package/cjs/chart/line/line.js.map +1 -1
- package/cjs/chart/radar/radar.js +2 -1
- package/cjs/chart/radar/radar.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/series/area/interface.d.ts +1 -0
- package/cjs/series/area/interface.js.map +1 -1
- package/cjs/series/line/interface.d.ts +1 -0
- package/cjs/series/line/interface.js.map +1 -1
- package/cjs/series/mixin/line-mixin.d.ts +10 -2
- package/cjs/series/mixin/line-mixin.js +53 -6
- package/cjs/series/mixin/line-mixin.js.map +1 -1
- package/cjs/series/radar/interface.d.ts +1 -0
- package/cjs/series/radar/interface.js.map +1 -1
- package/esm/chart/area/area.js +2 -1
- package/esm/chart/area/area.js.map +1 -1
- package/esm/chart/line/line.js +2 -1
- package/esm/chart/line/line.js.map +1 -1
- package/esm/chart/radar/radar.js +2 -1
- package/esm/chart/radar/radar.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/series/area/interface.d.ts +1 -0
- package/esm/series/area/interface.js.map +1 -1
- package/esm/series/line/interface.d.ts +1 -0
- package/esm/series/line/interface.js.map +1 -1
- package/esm/series/mixin/line-mixin.d.ts +10 -2
- package/esm/series/mixin/line-mixin.js +60 -5
- package/esm/series/mixin/line-mixin.js.map +1 -1
- package/esm/series/radar/interface.d.ts +1 -0
- package/esm/series/radar/interface.js.map +1 -1
- package/package.json +3 -3
package/build/index.js
CHANGED
|
@@ -58413,7 +58413,7 @@
|
|
|
58413
58413
|
VChart.useMark([ComponentMark, GroupMark, ImageMark]);
|
|
58414
58414
|
Factory.registerRegion('region', Region);
|
|
58415
58415
|
Factory.registerLayout('base', Layout);
|
|
58416
|
-
const version = "1.2.
|
|
58416
|
+
const version = "1.2.2-alpha.0";
|
|
58417
58417
|
Logger.getInstance(LoggerLevel.Error);
|
|
58418
58418
|
|
|
58419
58419
|
var SeriesMarkNameEnum;
|
|
@@ -64428,6 +64428,32 @@
|
|
|
64428
64428
|
}
|
|
64429
64429
|
return lineMark;
|
|
64430
64430
|
}
|
|
64431
|
+
_getEventElement(params, reverse = false) {
|
|
64432
|
+
let data = [];
|
|
64433
|
+
params.dimensionInfo.some(df => {
|
|
64434
|
+
df.data.some(dd => {
|
|
64435
|
+
if (dd.series === this) {
|
|
64436
|
+
data = dd.datum;
|
|
64437
|
+
return true;
|
|
64438
|
+
}
|
|
64439
|
+
return false;
|
|
64440
|
+
});
|
|
64441
|
+
return !data.length;
|
|
64442
|
+
});
|
|
64443
|
+
return data;
|
|
64444
|
+
}
|
|
64445
|
+
_dimensionTrigger(params) {
|
|
64446
|
+
const elements = this._getEventElement(params);
|
|
64447
|
+
switch (params.action) {
|
|
64448
|
+
case 'enter':
|
|
64449
|
+
this._symbolActiveMark.getDataView().parse(elements);
|
|
64450
|
+
this._symbolActiveMark.getData().updateData(false);
|
|
64451
|
+
break;
|
|
64452
|
+
case 'leave':
|
|
64453
|
+
this._symbolActiveMark.getDataView().parse([]);
|
|
64454
|
+
this._symbolActiveMark.getData().updateData(false);
|
|
64455
|
+
}
|
|
64456
|
+
}
|
|
64431
64457
|
initSymbolMark(progressive, isSeriesMark) {
|
|
64432
64458
|
this._symbolMark = this._createMark(lineLikeSeriesMarkMap.point, {
|
|
64433
64459
|
morph: shouldDoMorph(this._spec.animation, this._spec.morph, userAnimationConfig('point', this._spec)),
|
|
@@ -64437,34 +64463,65 @@
|
|
|
64437
64463
|
progressive,
|
|
64438
64464
|
isSeriesMark: !!isSeriesMark
|
|
64439
64465
|
});
|
|
64466
|
+
if (this._spec.activePoint === true) {
|
|
64467
|
+
const activeData = new DataView(this._option.dataSet, { name: `${PREFIX}_series_${this.id}_active_point` });
|
|
64468
|
+
activeData.parse([]);
|
|
64469
|
+
this._symbolActiveMark = this._createMark({ name: `active_point`, type: MarkTypeEnum.symbol }, {
|
|
64470
|
+
morph: false,
|
|
64471
|
+
groupKey: this._seriesField,
|
|
64472
|
+
label: null,
|
|
64473
|
+
isSeriesMark: false,
|
|
64474
|
+
dataView: activeData
|
|
64475
|
+
});
|
|
64476
|
+
this._symbolActiveMark.setVisible(false);
|
|
64477
|
+
}
|
|
64440
64478
|
return this._symbolMark;
|
|
64441
64479
|
}
|
|
64442
64480
|
initSymbolMarkStyle() {
|
|
64443
64481
|
const symbolMark = this._symbolMark;
|
|
64444
|
-
if (symbolMark) {
|
|
64482
|
+
if (!symbolMark) {
|
|
64483
|
+
return symbolMark;
|
|
64484
|
+
}
|
|
64485
|
+
this.setMarkStyle(symbolMark, {
|
|
64486
|
+
fill: this.getColorAttribute()
|
|
64487
|
+
}, 'normal', AttributeLevel.Series);
|
|
64488
|
+
if (this._invalidType) {
|
|
64445
64489
|
this.setMarkStyle(symbolMark, {
|
|
64446
|
-
|
|
64447
|
-
|
|
64448
|
-
|
|
64449
|
-
this.setMarkStyle(symbolMark, {
|
|
64450
|
-
visible: (datum) => {
|
|
64451
|
-
if (this._invalidType === 'break') {
|
|
64452
|
-
return couldBeValidNumber(datum[this.getStackValueField()]);
|
|
64453
|
-
}
|
|
64454
|
-
else if (this._invalidType === 'link') {
|
|
64455
|
-
return couldBeValidNumber(datum[this.getStackValueField()]);
|
|
64456
|
-
}
|
|
64457
|
-
return true;
|
|
64490
|
+
visible: (datum) => {
|
|
64491
|
+
if (this._invalidType === 'break') {
|
|
64492
|
+
return couldBeValidNumber(datum[this.getStackValueField()]);
|
|
64458
64493
|
}
|
|
64459
|
-
|
|
64460
|
-
|
|
64461
|
-
|
|
64462
|
-
|
|
64463
|
-
|
|
64464
|
-
z: this.dataToPositionZ.bind(this)
|
|
64494
|
+
else if (this._invalidType === 'link') {
|
|
64495
|
+
return couldBeValidNumber(datum[this.getStackValueField()]);
|
|
64496
|
+
}
|
|
64497
|
+
return true;
|
|
64498
|
+
}
|
|
64465
64499
|
}, 'normal', AttributeLevel.Series);
|
|
64466
|
-
|
|
64467
|
-
|
|
64500
|
+
}
|
|
64501
|
+
this.setMarkStyle(symbolMark, {
|
|
64502
|
+
x: this.dataToPositionX.bind(this),
|
|
64503
|
+
y: this.dataToPositionY.bind(this),
|
|
64504
|
+
z: this.dataToPositionZ.bind(this)
|
|
64505
|
+
}, 'normal', AttributeLevel.Series);
|
|
64506
|
+
this._trigger.registerMark(symbolMark);
|
|
64507
|
+
this._tooltipHelper?.activeTriggerSet.mark.add(symbolMark);
|
|
64508
|
+
if (this._symbolActiveMark && this._symbolMark.stateStyle.dimension_hover) {
|
|
64509
|
+
this._symbolActiveMark.setVisible(true);
|
|
64510
|
+
this.event.on(DimensionEventEnum.dimensionHover, this._dimensionTrigger.bind(this));
|
|
64511
|
+
for (const state in this._symbolMark.stateStyle) {
|
|
64512
|
+
this._symbolActiveMark.stateStyle[state] = {};
|
|
64513
|
+
for (const key in this._symbolMark.stateStyle[state]) {
|
|
64514
|
+
this._symbolActiveMark.stateStyle[state][key] = {
|
|
64515
|
+
style: null,
|
|
64516
|
+
level: AttributeLevel.Series,
|
|
64517
|
+
referer: symbolMark
|
|
64518
|
+
};
|
|
64519
|
+
}
|
|
64520
|
+
}
|
|
64521
|
+
this._symbolActiveMark.state.changeStateInfo({
|
|
64522
|
+
stateValue: STATE_VALUE_ENUM.STATE_DIMENSION_HOVER,
|
|
64523
|
+
filter: () => true
|
|
64524
|
+
});
|
|
64468
64525
|
}
|
|
64469
64526
|
return symbolMark;
|
|
64470
64527
|
}
|
|
@@ -76337,7 +76394,8 @@
|
|
|
76337
76394
|
point: spec.point,
|
|
76338
76395
|
line: spec.line,
|
|
76339
76396
|
area: spec.area,
|
|
76340
|
-
seriesMark: spec.seriesMark ?? 'area'
|
|
76397
|
+
seriesMark: spec.seriesMark ?? 'area',
|
|
76398
|
+
activePoint: spec.activePoint
|
|
76341
76399
|
};
|
|
76342
76400
|
}
|
|
76343
76401
|
transformSpec(spec) {
|
|
@@ -76885,7 +76943,8 @@
|
|
|
76885
76943
|
invalidType: spec.invalidType || 'break',
|
|
76886
76944
|
point: spec.point,
|
|
76887
76945
|
line: spec.line,
|
|
76888
|
-
seriesMark: spec.seriesMark ?? 'line'
|
|
76946
|
+
seriesMark: spec.seriesMark ?? 'line',
|
|
76947
|
+
activePoint: spec.activePoint
|
|
76889
76948
|
};
|
|
76890
76949
|
}
|
|
76891
76950
|
transformSpec(spec) {
|
|
@@ -77180,7 +77239,8 @@
|
|
|
77180
77239
|
area: merge$2({
|
|
77181
77240
|
visible: false
|
|
77182
77241
|
}, spec.area),
|
|
77183
|
-
seriesMark: spec.seriesMark ?? 'area'
|
|
77242
|
+
seriesMark: spec.seriesMark ?? 'area',
|
|
77243
|
+
activePoint: spec.activePoint
|
|
77184
77244
|
};
|
|
77185
77245
|
}
|
|
77186
77246
|
transformSpec(spec) {
|