@visactor/vchart 2.0.10 → 2.0.11-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.es.js +20 -6
- package/build/index.js +20 -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.js +6 -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.js +6 -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 +9 -9
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.0";
|
|
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
|
}
|
|
@@ -95902,7 +95903,16 @@ class Tooltip extends BaseComponent {
|
|
|
95902
95903
|
}
|
|
95903
95904
|
};
|
|
95904
95905
|
this._showTooltipByMouseEvent = (activeType, mouseEventData, params, isClick, useCache) => {
|
|
95905
|
-
var _a;
|
|
95906
|
+
var _a, _b;
|
|
95907
|
+
if ((_a = this._option) === null || _a === void 0 ? void 0 : _a.componentShowContent) {
|
|
95908
|
+
if (this._option.componentShowContent.tooltip === false) {
|
|
95909
|
+
return false;
|
|
95910
|
+
}
|
|
95911
|
+
if (isObject$2(this._option.componentShowContent.tooltip) &&
|
|
95912
|
+
this._option.componentShowContent.tooltip[activeType] === false) {
|
|
95913
|
+
return false;
|
|
95914
|
+
}
|
|
95915
|
+
}
|
|
95906
95916
|
const processor = this.processor[activeType];
|
|
95907
95917
|
if (!processor.shouldHandleTooltip(params, mouseEventData.tooltipInfo[activeType])) {
|
|
95908
95918
|
return false;
|
|
@@ -95935,7 +95945,7 @@ class Tooltip extends BaseComponent {
|
|
|
95935
95945
|
}, this._spec.hideTimer);
|
|
95936
95946
|
}
|
|
95937
95947
|
}
|
|
95938
|
-
const vchart = (
|
|
95948
|
+
const vchart = (_b = this._option) === null || _b === void 0 ? void 0 : _b.globalInstance;
|
|
95939
95949
|
if (success && VChart.globalConfig.uniqueTooltip && vchart) {
|
|
95940
95950
|
VChart.hideTooltip(vchart.id);
|
|
95941
95951
|
}
|
|
@@ -96515,6 +96525,10 @@ class BaseCrossHair extends BaseComponent {
|
|
|
96515
96525
|
}
|
|
96516
96526
|
}
|
|
96517
96527
|
_registerEvent(eventName, isOut, click) {
|
|
96528
|
+
var _a;
|
|
96529
|
+
if (!isOut && ((_a = this._option.componentShowContent) === null || _a === void 0 ? void 0 : _a.crosshair) === false) {
|
|
96530
|
+
return;
|
|
96531
|
+
}
|
|
96518
96532
|
const handler = isOut ? this._handleOutEvent : click ? this._handleClickInEvent : this._handleHoverInEvent;
|
|
96519
96533
|
const cfg = isOut ? { level: Event_Bubble_Level.chart } : { source: Event_Source_Type.chart };
|
|
96520
96534
|
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.0";
|
|
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
|
}
|
|
@@ -95908,7 +95909,16 @@
|
|
|
95908
95909
|
}
|
|
95909
95910
|
};
|
|
95910
95911
|
this._showTooltipByMouseEvent = (activeType, mouseEventData, params, isClick, useCache) => {
|
|
95911
|
-
var _a;
|
|
95912
|
+
var _a, _b;
|
|
95913
|
+
if ((_a = this._option) === null || _a === void 0 ? void 0 : _a.componentShowContent) {
|
|
95914
|
+
if (this._option.componentShowContent.tooltip === false) {
|
|
95915
|
+
return false;
|
|
95916
|
+
}
|
|
95917
|
+
if (isObject$2(this._option.componentShowContent.tooltip) &&
|
|
95918
|
+
this._option.componentShowContent.tooltip[activeType] === false) {
|
|
95919
|
+
return false;
|
|
95920
|
+
}
|
|
95921
|
+
}
|
|
95912
95922
|
const processor = this.processor[activeType];
|
|
95913
95923
|
if (!processor.shouldHandleTooltip(params, mouseEventData.tooltipInfo[activeType])) {
|
|
95914
95924
|
return false;
|
|
@@ -95941,7 +95951,7 @@
|
|
|
95941
95951
|
}, this._spec.hideTimer);
|
|
95942
95952
|
}
|
|
95943
95953
|
}
|
|
95944
|
-
const vchart = (
|
|
95954
|
+
const vchart = (_b = this._option) === null || _b === void 0 ? void 0 : _b.globalInstance;
|
|
95945
95955
|
if (success && VChart.globalConfig.uniqueTooltip && vchart) {
|
|
95946
95956
|
VChart.hideTooltip(vchart.id);
|
|
95947
95957
|
}
|
|
@@ -96521,6 +96531,10 @@
|
|
|
96521
96531
|
}
|
|
96522
96532
|
}
|
|
96523
96533
|
_registerEvent(eventName, isOut, click) {
|
|
96534
|
+
var _a;
|
|
96535
|
+
if (!isOut && ((_a = this._option.componentShowContent) === null || _a === void 0 ? void 0 : _a.crosshair) === false) {
|
|
96536
|
+
return;
|
|
96537
|
+
}
|
|
96524
96538
|
const handler = isOut ? this._handleOutEvent : click ? this._handleClickInEvent : this._handleHoverInEvent;
|
|
96525
96539
|
const cfg = isOut ? { level: Event_Bubble_Level.chart } : { source: Event_Source_Type.chart };
|
|
96526
96540
|
if (isArray$1(eventName)) {
|