You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@echarts.apache.org by "Xiaobaishushu25 (via GitHub)" <gi...@apache.org> on 2024/10/20 14:24:01 UTC

[I] [Feature] when symbol is svg,make the whole area of svg can trigger mouse event,not just the svg path [echarts]

Xiaobaishushu25 opened a new issue, #20434:
URL: https://github.com/apache/echarts/issues/20434

   ### 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. 
   ![A](https://github.com/user-attachments/assets/f44b5836-257f-4b86-99dd-058ecbc30c82)
   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 perimeter
   `square` will create a square clickable area around the shape perimeter
   `none` (or undefined or not-set) - events will fire only when clicking the paths


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [I] [Feature] when symbol is svg,make the whole area of svg can trigger mouse event,not just the svg path [echarts]

Posted by "Xiaobaishushu25 (via GitHub)" <gi...@apache.org>.
Xiaobaishushu25 closed issue #20434: [Feature] when symbol is svg,make the whole area of svg can trigger mouse event,not just the svg path
URL: https://github.com/apache/echarts/issues/20434


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [I] [Feature] when symbol is svg,make the whole area of svg can trigger mouse event,not just the svg path [echarts]

Posted by "helgasoft (via GitHub)" <gi...@apache.org>.
helgasoft commented on issue #20434:
URL: https://github.com/apache/echarts/issues/20434#issuecomment-2425213613

   > 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](https://echarts.apache.org/examples/en/editor.html?code=BYUwhgTgLgvABAIgLIEYAMAaAzGuBBOAJk2Lk0xTgFZMd8iTdyNKBOW3ARTnYwDZcNDOzjd0_XOLoAvBACgAzgDcA5nHhwA5AB5lagB4BbADYA7BTATAoUAA4AuAPSOA7m4B0LrO4D2EFY7EaGiOeghwSgCWIC4AQj76lkxw6JLBCAB8mnAA1HJwWtq2YFDAcABmkcbGlqY-piDhClAQPgDWIJYQIAAmTS3tIAC0LpE9pZZYtvrhPZbZOXCgkFC5WuGOGdqhqlkA3HJyPrZQkfXqcADe-XD6ePqRCvZXNwVQAJ62IM-aAMYlIBUfnemgwrzgPRKYGeAG1NEh6qCtAAVACuICRmgA6r1McjgKjMQAxCCRTEAZRKFNRpk0AF0bgBfMEFd73R7PS5wZlwKA-HzGU4OS7Mm4KECkkBPOAw8HXAoKiFQ2EoIREHAYIiEAAsmsIKAAHJqUFgqMbtQB2PUCOksxW8z7fLTGSINJHggoKd6GABGAp-kUMYBU32ckKg0MDwZAOxUOSMxj2v2AkHFsFRUHKRs0iz0mo9cGcXt9_q0xVKTkcOaW4Gg-ftcGLfuM5Mi0m-VCo4MZNwZjL2QA)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org


Re: [I] [Feature] when symbol is svg,make the whole area of svg can trigger mouse event,not just the svg path [echarts]

Posted by "Xiaobaishushu25 (via GitHub)" <gi...@apache.org>.
Xiaobaishushu25 commented on issue #20434:
URL: https://github.com/apache/echarts/issues/20434#issuecomment-2425949097

   > > 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](https://echarts.apache.org/examples/en/editor.html?code=BYUwhgTgLgvABAIgLIEYAMAaAzGuBBOAJk2Lk0xTgFZMd8iTdyNKBOW3ARTnYwDZcNDOzjd0_XOLoAvBACgAzgDcA5nHhwA5AB5lagB4BbADYA7BTATAoUAA4AuAPSOA7m4B0LrO4D2EFY7EaGiOeghwSgCWIC4AQj76lkxw6JLBCAB8mnAA1HJwWtq2YFDAcABmkcbGlqY-piDhClAQPgDWIJYQIAAmTS3tIAC0LpE9pZZYtvrhPZbZOXCgkFC5WuGOGdqhqlkA3HJyPrZQkfXqcADe-XD6ePqRCvZXNwVQAJ62IM-aAMYlIBUfnemgwrzgPRKYGeAG1NEh6qCtAAVACuICRmgA6r1McjgKjMQAxCCRTEAZRKFNRpk0AF0bgBfMEFd73R7PS5wZlwKA-HzGU4OS7Mm4KECkkBPOAw8HXAoKiFQ2EoIREHAYIiEAAsmsIKAAHJqUFgqMbtQB2PUCOksxW8z7fLTGSINJHggoKd6GABGAp-kUMYBU32ckKg0MDwZAOxUOSMxj2v2AkHFsFRUHKRs0iz0mo9cGcXt9_q0xVKTkcOaW4Gg-ftcGLfuM5Mi0m-VCo4MZNwZjL2QA)
   
   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](https://echarts.apache.org/examples/zh/editor.html?c=scatter-simple&code=PYBwLglsB2AEC8sDeAoW6zGAG0iAXEgL4A0asAHgIIUQDO-yp5AnjfY8WenQKYBOEXg1gBtculTppsOiwC2AIxwBlCAC9ejAKwAGb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wQhCTAQQAHMWYEfB6QgNl5A5Qk6EFYAAHd8GZgBXXhLiIGJpfQTwUCIABuIA), 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.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@echarts.apache.org
For additional commands, e-mail: commits-help@echarts.apache.org