Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/component/tooltip/TooltipView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,12 @@ class TooltipView extends ComponentView {
const api = this._api;
const triggerOn = tooltipModel.get('triggerOn');

if (tooltipModel.get('trigger') !== 'axis') {
// _lastDataByCoordSys and _cbParamsList are used for axis tooltip only.
this._lastDataByCoordSys = null;
this._cbParamsList = null;
}

// Try to keep the tooltip show when refreshing
if (this._lastX != null
&& this._lastY != null
Expand Down Expand Up @@ -393,6 +399,7 @@ class TooltipView extends ComponentView {
}

this._lastX = this._lastY = this._lastDataByCoordSys = null;
this._cbParamsList = null;

if (payload.from !== this.uid) {
this._hide(makeDispatchAction(payload, api));
Expand Down Expand Up @@ -468,6 +475,7 @@ class TooltipView extends ComponentView {
return;
}
this._lastDataByCoordSys = null;
this._cbParamsList = null;

let seriesDispatcher: Element;
let cmptDispatcher: Element;
Expand Down Expand Up @@ -501,6 +509,7 @@ class TooltipView extends ComponentView {
}
else {
this._lastDataByCoordSys = null;
this._cbParamsList = null;
this._hide(dispatchAction);
}
}
Expand Down Expand Up @@ -1027,6 +1036,7 @@ class TooltipView extends ComponentView {
// FIXME
// duplicated hideTip if manuallyHideTip is called from dispatchAction.
this._lastDataByCoordSys = null;
this._cbParamsList = null;
dispatchAction({
type: 'hideTip',
from: this.uid
Expand All @@ -1040,6 +1050,11 @@ class TooltipView extends ComponentView {
clear(this, '_updatePosition');
this._tooltipContent.dispose();
globalListener.unregister('itemTooltip', api);

this._tooltipContent = null;
this._tooltipModel = null;
this._lastDataByCoordSys = null;
this._cbParamsList = null;
}
}

Expand Down
1 change: 1 addition & 0 deletions test/runTest/actions/__meta__.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions test/runTest/actions/tooltip-refresh.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

120 changes: 120 additions & 0 deletions test/tooltip-refresh.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.