apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.69k stars 19.62k forks source link

[Bug] The getDataURL() method ignores when map emphasis is disabled #20440

Open jgoncab-arte opened 1 month ago

jgoncab-arte commented 1 month ago

Version

5.5.0

Link to Minimal Reproduction

https://echarts.apache.org/examples/en/editor.html?c=map-usa-projection&version=5.5.0&renderer=svg&code=LYTwwgFghgTgLgOgM4QPYHcAyqoBMCWAdgOYAUAlANwBQAJAuhAKaGnUAE79xTcpASgHlBAFQD6ABQCCIgBLsA1OwDkAelxQ4UVVCRJeqnqlUBVAMpSEAKySpCy8gBoOXBDzhmAxjHwAHPsoQcHC-SABcqqoAZrpwADYg1ki4THH4AG4wCIQGhL7A6gDMALSwMFAgDs6c3LxePv6kgcGhEdGxCUkpaZnZuflFxUYO1OQIuHZMpFEAroSecPh27KQwTEjk7ADeLp52SHDsM0hQAFK2hOwAvOxrSADaAAwAujSce4QH7L4wqFZMCyWlxuuEKbiYqCkcQARkwYEgTCcKG92KBILBEBB8ClsHgiGQqC4AdB4EgEGtiPgDnCALJQXxNcxSZSOI4nc52QmcVD-IHXbYuTjpKkzKBxOm-MICzgy1FEKUAVkeyuV1VlqKgAA8pYUABwqlVq2VEfhQEhMKU7dUyvZxVAwKX3QXWlQAYkKAEZCgA2ACcCpZzutyldUCVjwATN7lEGZc9YwBfZ0Jo3sIyW2PAelS5RMwPWpjAXzQJBUjMu9gEE7QuJMXBSuAwGZMRPJ1P6HzrR2xq0uuAgXwWlRZ3z5l1GACShBS2vYj1Tso0Wm7Fc4W3YhCgwCHyihUGhW6gLPY6TFzalABZdRGI5HCuwU7HZevN9uc3ukABrI-s09xc_sAA7J6F4Xr6D4LuqL5bjuUg-AAXnYP4nmeQ7egqCqFBGGEQU-MrQW-Khwd-ny6Mef4ARGvpgV6Hq4au2wbjBOZgGK-BRPahD4MhFFDnqjwXh6F6FI89GrgRO5gKgdrlBM5GoYqHq6oBCrXmJFYSSxdg5IC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kkQPoOAgheR2FIDyRYnIUTlOkkwBAdoyApD2CkEw_AJxSSLJMQgfAFkYnBHAH-WgzmYFIFsfsg4cxIHSMQZQCZyAApoP8ygQA

Steps to Reproduce

  1. Create a chart with the SVG renderer.
  2. Add some series with the 'map' type.
  3. Disable the emphasis.
  4. Use the getDataURL() method.

In the link I show the result of the method in the console.

Current Behavior

Even when the map works perfectly and no elements are highlighted on hover, the result of getDataUrl() adds some styles at the end that activate the emphasis.

Expected Behavior

If the chart has the emphasis disabled, the result of getDataUrl() should also have the emphasis disabled.

Environment

echarts editor
- Browser: Chrome 129.0.6668.103

Any additional comments?

The error started occurring in version 5.5.0, but I can't use the previous version because I need to use some features added in this version.

helgasoft commented 1 month ago

result of getDataUrl() adds some styles at the end that activate the emphasis.

cannot replicate. I run the code and copy the SVG from the Console, then paste it in an online viewer, and see an exact image of the chart, no "emphasis" anywhere. Could you please show an image with "emphasis" ?

jgoncab-arte commented 1 month ago

chart.txt Here there is an html file with just the generated svg displayed in the console. When I open it in the browser the emphasis is enabled. image

jgoncab-arte commented 1 month ago

I could see that it also happens when you download the svg in the link of the online viewer.