Skip to content

Commit

Permalink
Merge pull request #16939 from jiawulin001/issue#16930
Browse files Browse the repository at this point in the history
fix: tooltip content changes with axis extent when 'triggerOn' set to 'click'
  • Loading branch information
pissang authored Apr 28, 2022
2 parents 3961cef + 1258fa7 commit f783cd8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/component/tooltip/TooltipView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,14 +249,16 @@ class TooltipView extends ComponentView {
const tooltipModel = this._tooltipModel;
const ecModel = this._ecModel;
const api = this._api;
const triggerOn = tooltipModel.get('triggerOn');

// Try to keep the tooltip show when refreshing
if (this._lastX != null
&& this._lastY != null
// When user is willing to control tooltip totally using API,
// self.manuallyShowTip({x, y}) might cause tooltip hide,
// which is not expected.
&& tooltipModel.get('triggerOn') !== 'none'
&& triggerOn !== 'none'
&& triggerOn !== 'click'
) {
const self = this;
clearTimeout(this._refreshUpdateTimeout);
Expand Down

0 comments on commit f783cd8

Please sign in to comment.