Closed Xiaobaishushu25 closed 1 month ago
The area between the paths is not clickable.
Could you please present SVG code for such symbol ? I'm trying with single path and cannot reproduce - Demo
The area between the paths is not clickable.
Could you please present SVG code for such symbol ? I'm trying with single path and cannot reproduce - Demo
Thank you very much for your demo. I learned how to use 'image://data:image/svg+xml;charset=utf8,'+ svg,
to set up symbol.
At first, I consulted the official documentation https://echarts.apache.org/zh/option.html#series-scatter.symbol and only provided such examples symbol:'path://xx'
when setting up SVG. I wrote the demo according to the document demo, and you can see that the tooltip cannot be triggered when the mouse is placed in a transparent area. But now with your method, it works very well.
What problem does this feature solve?
When Symbol is SVG, only the SVG paths will generate a click event. so the User need to be precise in order to click on a node. The area between the paths is not clickable. For example,Like the SVG above, only the middle T and black border can correspond to mouse events, and the transparent area in the middle cannot be triggered.
What does the proposed API look like?
Suggested is to augment the Symbol attributes with SymbolMask:
match
|square
|none
, where:match
will make the whole SVG clickable, tracking the outline shape perimetersquare
will create a square clickable area around the shape perimeternone
(or undefined or not-set) - events will fire only when clicking the paths