Version
3.8.5
Steps to reproduce
点击 markPoint,打开series[0]第n位的 tooltip,当第n位的 value有数据时正常,当 value为 '-'时 tooltip不显示。
What is expected?
tooltip能被正常打开,无论对应位置上的数据有没有。
What is actually happening?
当 value为 '-'时 tooltip不显示。
chartInstance.on('click', params => {
if (params.componentType === 'markPoint') {
chartInstance.dispatchAction({
type: 'showTip',
seriesIndex: 0,
dataIndex: params.data._absolutePos // 手动在外部绑定的位置信息,已确定位置信息正确
})
}
})
复现步骤:
- 首先点击markPoint,打开 _absolutePos上有数据的一项,功能正常:
- 然后再打开 _absolutePos上 value为 '-',功能异常。
第一步时 tooltip面板样式:
<div style="position: absolute; display: none; border-style: solid; white-space: nowrap; z-index: 9999999;
transition: left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s;
background-color: rgba(50, 50, 50, 0.7); border-width: 0px; border-color: rgb(51, 51, 51);
border-radius: 4px; color: rgb(255, 255, 255); font: 14px / 21px "Microsoft YaHei";
padding: 5px; left: 211.954px; top: 291.246px;">
<div style="padding: 2px 8px 2px 6px;max-height: 450px;overflow-y: auto;">
<p style="max-width: 1000px;white-space: pre-wrap;">2021-06-01(周二;儿童节;30)</p>
<p>
<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:$4fa8f9;"></span>
活跃用户: 5,722</p>
<p>
<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:$6ec71e;"></span>
新增用户: 3,308</p>
</div>
</div>
第二步时 tooltip面板样式:
(tooltip样式增加了 display: none,其他样式和内容都没有发生改变)
<div style="position: absolute; display: none; border-style: solid; white-space: nowrap; z-index: 9999999;
transition: left 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s, top 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0s;
background-color: rgba(50, 50, 50, 0.7); border-width: 0px; border-color: rgb(51, 51, 51);
border-radius: 4px; color: rgb(255, 255, 255); font: 14px / 21px "Microsoft YaHei";
padding: 5px; left: 211.954px; top: 291.246px;">
<div style="padding: 2px 8px 2px 6px;max-height: 450px;overflow-y: auto;">
<p style="max-width: 1000px;white-space: pre-wrap;">2021-06-01(周二;儿童节;30)</p>
<p>
<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:fa8f9;"></span>
活跃用户: 5,722</p>
<p>
<span style="display:inline-block;margin-right:5px;border-radius:10px;width:9px;height:9px;background-color:ec71e;"></span>
新增用户: 3,308</p>
</div>
</div>
Version
3.8.5
Steps to reproduce
点击 markPoint,打开series[0]第n位的 tooltip,当第n位的 value有数据时正常,当 value为 '-'时 tooltip不显示。
What is expected?
tooltip能被正常打开,无论对应位置上的数据有没有。
What is actually happening?
当 value为 '-'时 tooltip不显示。
复现步骤:
第一步时 tooltip面板样式:
第二步时 tooltip面板样式:
(tooltip样式增加了 display: none,其他样式和内容都没有发生改变)