@visactor/vchart 2.0.10 → 2.0.11-alpha.1
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 +34 -6
- package/build/index.js +34 -6
- package/build/index.min.js +2 -2
- package/build/tsconfig.tsbuildinfo +1 -1
- package/cjs/chart/base/base-chart.js +2 -1
- package/cjs/chart/base/base-chart.js.map +1 -1
- package/cjs/chart/interface/common.d.ts +5 -1
- package/cjs/chart/interface/common.js.map +1 -1
- package/cjs/component/crosshair/base.js +2 -0
- package/cjs/component/crosshair/base.js.map +1 -1
- package/cjs/component/tooltip/tooltip.d.ts +2 -1
- package/cjs/component/tooltip/tooltip.js +12 -2
- package/cjs/component/tooltip/tooltip.js.map +1 -1
- package/cjs/core/index.d.ts +1 -1
- package/cjs/core/index.js +1 -1
- package/cjs/core/index.js.map +1 -1
- package/cjs/core/vchart.js +2 -1
- package/cjs/core/vchart.js.map +1 -1
- package/cjs/model/interface.d.ts +4 -0
- package/cjs/model/interface.js.map +1 -1
- package/cjs/typings/spec/common.d.ts +5 -0
- package/cjs/typings/spec/common.js.map +1 -1
- package/esm/chart/base/base-chart.js +2 -1
- package/esm/chart/base/base-chart.js.map +1 -1
- package/esm/chart/interface/common.d.ts +5 -1
- package/esm/chart/interface/common.js.map +1 -1
- package/esm/component/crosshair/base.js +2 -0
- package/esm/component/crosshair/base.js.map +1 -1
- package/esm/component/tooltip/tooltip.d.ts +2 -1
- package/esm/component/tooltip/tooltip.js +12 -2
- package/esm/component/tooltip/tooltip.js.map +1 -1
- package/esm/core/index.d.ts +1 -1
- package/esm/core/index.js +1 -1
- package/esm/core/index.js.map +1 -1
- package/esm/core/vchart.js +2 -1
- package/esm/core/vchart.js.map +1 -1
- package/esm/model/interface.d.ts +4 -0
- package/esm/model/interface.js.map +1 -1
- package/esm/typings/spec/common.d.ts +5 -0
- package/esm/typings/spec/common.js.map +1 -1
- package/package.json +5 -5
package/build/index.es.js
CHANGED
|
@@ -61412,7 +61412,8 @@ class VChart {
|
|
|
61412
61412
|
getSpecInfo: () => { var _a; return (_a = this._specInfo) !== null && _a !== void 0 ? _a : {}; },
|
|
61413
61413
|
layout: this._option.layout,
|
|
61414
61414
|
onError: this._onError,
|
|
61415
|
-
disableTriggerEvent: this._option.disableTriggerEvent === true
|
|
61415
|
+
disableTriggerEvent: this._option.disableTriggerEvent === true,
|
|
61416
|
+
componentShowContent: this._option.componentShowContent
|
|
61416
61417
|
};
|
|
61417
61418
|
}
|
|
61418
61419
|
}
|
|
@@ -61531,7 +61532,7 @@ const lookup = (data, opt) => {
|
|
|
61531
61532
|
});
|
|
61532
61533
|
};
|
|
61533
61534
|
|
|
61534
|
-
const version = "2.0.
|
|
61535
|
+
const version = "2.0.11-alpha.1";
|
|
61535
61536
|
|
|
61536
61537
|
const addVChartProperty = (data, op) => {
|
|
61537
61538
|
const context = op.beforeCall();
|
|
@@ -69367,7 +69368,7 @@ class BaseChart extends CompilableBase {
|
|
|
69367
69368
|
_setModelOption() {
|
|
69368
69369
|
}
|
|
69369
69370
|
constructor(spec, option) {
|
|
69370
|
-
var _a, _b, _c;
|
|
69371
|
+
var _a, _b, _c, _d;
|
|
69371
69372
|
super(option);
|
|
69372
69373
|
this.type = 'chart';
|
|
69373
69374
|
this.id = createID();
|
|
@@ -69498,7 +69499,7 @@ class BaseChart extends CompilableBase {
|
|
|
69498
69499
|
this._event = new Event$1(option.eventDispatcher, option.mode);
|
|
69499
69500
|
this._dataSet = option.dataSet;
|
|
69500
69501
|
this._chartData = new ChartData(this._dataSet);
|
|
69501
|
-
this._modelOption = Object.assign(Object.assign({}, option), { mode: this._option.mode, map: this._idMap, getChartLayoutRect: () => this._layoutRect, getChartViewRect: () => this._viewRect, getChart: () => this, globalScale: this._globalScale, onError: (_b = this._option) === null || _b === void 0 ? void 0 : _b.onError, disableTriggerEvent: ((_c = this._option) === null || _c === void 0 ? void 0 : _c.disableTriggerEvent) === true, getSeriesData: this._chartData.getSeriesData.bind(this._chartData), dispatchEvent: (eType, params) => this._option.globalInstance.event.emit(eType, params) });
|
|
69502
|
+
this._modelOption = Object.assign(Object.assign({}, option), { mode: this._option.mode, map: this._idMap, getChartLayoutRect: () => this._layoutRect, getChartViewRect: () => this._viewRect, getChart: () => this, globalScale: this._globalScale, onError: (_b = this._option) === null || _b === void 0 ? void 0 : _b.onError, disableTriggerEvent: ((_c = this._option) === null || _c === void 0 ? void 0 : _c.disableTriggerEvent) === true, componentShowContent: (_d = this._option) === null || _d === void 0 ? void 0 : _d.componentShowContent, getSeriesData: this._chartData.getSeriesData.bind(this._chartData), dispatchEvent: (eType, params) => this._option.globalInstance.event.emit(eType, params) });
|
|
69502
69503
|
if (this._setModelOption) {
|
|
69503
69504
|
this._setModelOption();
|
|
69504
69505
|
}
|
|
@@ -95881,7 +95882,10 @@ class Tooltip extends BaseComponent {
|
|
|
95881
95882
|
for (let i = 0, len = supportedTooltip.length; i < len; i++) {
|
|
95882
95883
|
const type = supportedTooltip[i];
|
|
95883
95884
|
const res = this.processor[type] ? this._showTooltipByMouseEvent(type, mouseEventData, params, isClick) : false;
|
|
95884
|
-
if (res) {
|
|
95885
|
+
if (res === 'unShowByOption') {
|
|
95886
|
+
success[type] = 'unShowByOption';
|
|
95887
|
+
}
|
|
95888
|
+
else {
|
|
95885
95889
|
success[type] = true;
|
|
95886
95890
|
break;
|
|
95887
95891
|
}
|
|
@@ -95895,7 +95899,11 @@ class Tooltip extends BaseComponent {
|
|
|
95895
95899
|
}
|
|
95896
95900
|
}
|
|
95897
95901
|
if (!success.mark && !success.group && (!success.dimension || isNil$1(dimensionInfo))) {
|
|
95898
|
-
|
|
95902
|
+
if (success.mark !== 'unShowByOption' &&
|
|
95903
|
+
success.dimension !== 'unShowByOption' &&
|
|
95904
|
+
success.group !== 'unShowByOption') {
|
|
95905
|
+
this._handleChartMouseOut(params);
|
|
95906
|
+
}
|
|
95899
95907
|
}
|
|
95900
95908
|
else {
|
|
95901
95909
|
this._initEventOfTooltipContent();
|
|
@@ -95903,6 +95911,9 @@ class Tooltip extends BaseComponent {
|
|
|
95903
95911
|
};
|
|
95904
95912
|
this._showTooltipByMouseEvent = (activeType, mouseEventData, params, isClick, useCache) => {
|
|
95905
95913
|
var _a;
|
|
95914
|
+
if (!this._showContentByEvent(activeType)) {
|
|
95915
|
+
return 'unShowByOption';
|
|
95916
|
+
}
|
|
95906
95917
|
const processor = this.processor[activeType];
|
|
95907
95918
|
if (!processor.shouldHandleTooltip(params, mouseEventData.tooltipInfo[activeType])) {
|
|
95908
95919
|
return false;
|
|
@@ -96160,6 +96171,19 @@ class Tooltip extends BaseComponent {
|
|
|
96160
96171
|
}
|
|
96161
96172
|
return throttle(callback, wait);
|
|
96162
96173
|
}
|
|
96174
|
+
_showContentByEvent(activeType) {
|
|
96175
|
+
var _a;
|
|
96176
|
+
if ((_a = this._option) === null || _a === void 0 ? void 0 : _a.componentShowContent) {
|
|
96177
|
+
if (this._option.componentShowContent.tooltip === false) {
|
|
96178
|
+
return false;
|
|
96179
|
+
}
|
|
96180
|
+
if (isObject$2(this._option.componentShowContent.tooltip) &&
|
|
96181
|
+
this._option.componentShowContent.tooltip[activeType] === false) {
|
|
96182
|
+
return false;
|
|
96183
|
+
}
|
|
96184
|
+
}
|
|
96185
|
+
return true;
|
|
96186
|
+
}
|
|
96163
96187
|
reInit(spec) {
|
|
96164
96188
|
var _a, _b, _c;
|
|
96165
96189
|
super.reInit(spec);
|
|
@@ -96515,6 +96539,10 @@ class BaseCrossHair extends BaseComponent {
|
|
|
96515
96539
|
}
|
|
96516
96540
|
}
|
|
96517
96541
|
_registerEvent(eventName, isOut, click) {
|
|
96542
|
+
var _a;
|
|
96543
|
+
if (((_a = this._option.componentShowContent) === null || _a === void 0 ? void 0 : _a.crosshair) === false) {
|
|
96544
|
+
return;
|
|
96545
|
+
}
|
|
96518
96546
|
const handler = isOut ? this._handleOutEvent : click ? this._handleClickInEvent : this._handleHoverInEvent;
|
|
96519
96547
|
const cfg = isOut ? { level: Event_Bubble_Level.chart } : { source: Event_Source_Type.chart };
|
|
96520
96548
|
if (isArray$1(eventName)) {
|
package/build/index.js
CHANGED
|
@@ -61418,7 +61418,8 @@
|
|
|
61418
61418
|
getSpecInfo: () => { var _a; return (_a = this._specInfo) !== null && _a !== void 0 ? _a : {}; },
|
|
61419
61419
|
layout: this._option.layout,
|
|
61420
61420
|
onError: this._onError,
|
|
61421
|
-
disableTriggerEvent: this._option.disableTriggerEvent === true
|
|
61421
|
+
disableTriggerEvent: this._option.disableTriggerEvent === true,
|
|
61422
|
+
componentShowContent: this._option.componentShowContent
|
|
61422
61423
|
};
|
|
61423
61424
|
}
|
|
61424
61425
|
}
|
|
@@ -61537,7 +61538,7 @@
|
|
|
61537
61538
|
});
|
|
61538
61539
|
};
|
|
61539
61540
|
|
|
61540
|
-
const version = "2.0.
|
|
61541
|
+
const version = "2.0.11-alpha.1";
|
|
61541
61542
|
|
|
61542
61543
|
const addVChartProperty = (data, op) => {
|
|
61543
61544
|
const context = op.beforeCall();
|
|
@@ -69373,7 +69374,7 @@
|
|
|
69373
69374
|
_setModelOption() {
|
|
69374
69375
|
}
|
|
69375
69376
|
constructor(spec, option) {
|
|
69376
|
-
var _a, _b, _c;
|
|
69377
|
+
var _a, _b, _c, _d;
|
|
69377
69378
|
super(option);
|
|
69378
69379
|
this.type = 'chart';
|
|
69379
69380
|
this.id = createID();
|
|
@@ -69504,7 +69505,7 @@
|
|
|
69504
69505
|
this._event = new Event$1(option.eventDispatcher, option.mode);
|
|
69505
69506
|
this._dataSet = option.dataSet;
|
|
69506
69507
|
this._chartData = new ChartData(this._dataSet);
|
|
69507
|
-
this._modelOption = Object.assign(Object.assign({}, option), { mode: this._option.mode, map: this._idMap, getChartLayoutRect: () => this._layoutRect, getChartViewRect: () => this._viewRect, getChart: () => this, globalScale: this._globalScale, onError: (_b = this._option) === null || _b === void 0 ? void 0 : _b.onError, disableTriggerEvent: ((_c = this._option) === null || _c === void 0 ? void 0 : _c.disableTriggerEvent) === true, getSeriesData: this._chartData.getSeriesData.bind(this._chartData), dispatchEvent: (eType, params) => this._option.globalInstance.event.emit(eType, params) });
|
|
69508
|
+
this._modelOption = Object.assign(Object.assign({}, option), { mode: this._option.mode, map: this._idMap, getChartLayoutRect: () => this._layoutRect, getChartViewRect: () => this._viewRect, getChart: () => this, globalScale: this._globalScale, onError: (_b = this._option) === null || _b === void 0 ? void 0 : _b.onError, disableTriggerEvent: ((_c = this._option) === null || _c === void 0 ? void 0 : _c.disableTriggerEvent) === true, componentShowContent: (_d = this._option) === null || _d === void 0 ? void 0 : _d.componentShowContent, getSeriesData: this._chartData.getSeriesData.bind(this._chartData), dispatchEvent: (eType, params) => this._option.globalInstance.event.emit(eType, params) });
|
|
69508
69509
|
if (this._setModelOption) {
|
|
69509
69510
|
this._setModelOption();
|
|
69510
69511
|
}
|
|
@@ -95887,7 +95888,10 @@
|
|
|
95887
95888
|
for (let i = 0, len = supportedTooltip.length; i < len; i++) {
|
|
95888
95889
|
const type = supportedTooltip[i];
|
|
95889
95890
|
const res = this.processor[type] ? this._showTooltipByMouseEvent(type, mouseEventData, params, isClick) : false;
|
|
95890
|
-
if (res) {
|
|
95891
|
+
if (res === 'unShowByOption') {
|
|
95892
|
+
success[type] = 'unShowByOption';
|
|
95893
|
+
}
|
|
95894
|
+
else {
|
|
95891
95895
|
success[type] = true;
|
|
95892
95896
|
break;
|
|
95893
95897
|
}
|
|
@@ -95901,7 +95905,11 @@
|
|
|
95901
95905
|
}
|
|
95902
95906
|
}
|
|
95903
95907
|
if (!success.mark && !success.group && (!success.dimension || isNil$1(dimensionInfo))) {
|
|
95904
|
-
|
|
95908
|
+
if (success.mark !== 'unShowByOption' &&
|
|
95909
|
+
success.dimension !== 'unShowByOption' &&
|
|
95910
|
+
success.group !== 'unShowByOption') {
|
|
95911
|
+
this._handleChartMouseOut(params);
|
|
95912
|
+
}
|
|
95905
95913
|
}
|
|
95906
95914
|
else {
|
|
95907
95915
|
this._initEventOfTooltipContent();
|
|
@@ -95909,6 +95917,9 @@
|
|
|
95909
95917
|
};
|
|
95910
95918
|
this._showTooltipByMouseEvent = (activeType, mouseEventData, params, isClick, useCache) => {
|
|
95911
95919
|
var _a;
|
|
95920
|
+
if (!this._showContentByEvent(activeType)) {
|
|
95921
|
+
return 'unShowByOption';
|
|
95922
|
+
}
|
|
95912
95923
|
const processor = this.processor[activeType];
|
|
95913
95924
|
if (!processor.shouldHandleTooltip(params, mouseEventData.tooltipInfo[activeType])) {
|
|
95914
95925
|
return false;
|
|
@@ -96166,6 +96177,19 @@
|
|
|
96166
96177
|
}
|
|
96167
96178
|
return throttle(callback, wait);
|
|
96168
96179
|
}
|
|
96180
|
+
_showContentByEvent(activeType) {
|
|
96181
|
+
var _a;
|
|
96182
|
+
if ((_a = this._option) === null || _a === void 0 ? void 0 : _a.componentShowContent) {
|
|
96183
|
+
if (this._option.componentShowContent.tooltip === false) {
|
|
96184
|
+
return false;
|
|
96185
|
+
}
|
|
96186
|
+
if (isObject$2(this._option.componentShowContent.tooltip) &&
|
|
96187
|
+
this._option.componentShowContent.tooltip[activeType] === false) {
|
|
96188
|
+
return false;
|
|
96189
|
+
}
|
|
96190
|
+
}
|
|
96191
|
+
return true;
|
|
96192
|
+
}
|
|
96169
96193
|
reInit(spec) {
|
|
96170
96194
|
var _a, _b, _c;
|
|
96171
96195
|
super.reInit(spec);
|
|
@@ -96521,6 +96545,10 @@
|
|
|
96521
96545
|
}
|
|
96522
96546
|
}
|
|
96523
96547
|
_registerEvent(eventName, isOut, click) {
|
|
96548
|
+
var _a;
|
|
96549
|
+
if (((_a = this._option.componentShowContent) === null || _a === void 0 ? void 0 : _a.crosshair) === false) {
|
|
96550
|
+
return;
|
|
96551
|
+
}
|
|
96524
96552
|
const handler = isOut ? this._handleOutEvent : click ? this._handleClickInEvent : this._handleHoverInEvent;
|
|
96525
96553
|
const cfg = isOut ? { level: Event_Bubble_Level.chart } : { source: Event_Source_Type.chart };
|
|
96526
96554
|
if (isArray$1(eventName)) {
|