Skip to content

Commit

Permalink
fix(tooltip): 修复 tooltip 数据为空时不隐藏的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
simaQ committed Mar 17, 2020
1 parent c3357c1 commit 76edffd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/chart/controller/tooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ export default class Tooltip extends Controller<TooltipOption> {
const view = this.view;
const items = this.getTooltipItems(point);
if (!items.length) {
// 无内容则不展示
// 无内容则不展示,同时 tooltip 需要隐藏
if (this.tooltip) {
this.tooltip.hide();
}
return;
}
const title = this.getTitle(items);
Expand Down

0 comments on commit 76edffd

Please sign in to comment.