echarts
echarts copied to clipboard
[Feature] When Symbol is SVG, make the area of the symbol clickable, no just the SVG paths
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, when the above SVG is used as a graph node symbol, only the black lines that outline the lightbulb are clickable, and the area between them does not generate a click event.
What does the proposed API look like?
Suggested is to augment the Symbol attributes with SymbolMask: 'match' | 'square' | 'none', where:
-
matchwill make the whole SVG clickable, tracking the outline shape perimeter -
squarewill create a square clickable area around the shape perimeter -
none(or undefined or not-set) - events will fire only when clicking the paths