What problem does this feature solve?
我的需求是这样的:
在chart上会显示一条绿色的markLine,意味着这里有一些comment信息需要显示。当点击markLine最上面的label时,需要显示出comment的信息。
因为click markLine自身会trigger click,我尝试设置markLine.label.triggerEvent: true但是不生效。另外目前也没有头绪当click 的时候如何要显示tooltip,请大家棒棒忙,万分感谢!
CodeSandbox: https://codesandbox.io/p/sandbox/basic-line-chart-forked-7kz7vl?file=%2Findex.js
What does the proposed API look like?
如题
2条答案
按热度按时间piok6c0g1#
@likepeach789 It seems you are not using English, I've helped translate the content automatically. To make your issue understood by more people and get helped, we'd like to suggest using English next time. 🤗
TRANSLATED
TITLE
[Help] How do I set the tooltip to be displayed only by clicking on the markLine's label?
rsaldnfx2#
Tooltips show only on mouseover, not on click.
One possibility to show tooltip over markLine only is without line symbols and
tooltip: { trigger: 'item'}
- Demo