Open ClemMakesApps opened 5 years ago
Thanks @ClemMakesApps . The SVG path set to https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.symbol is not really converted to a SVG element, but is parsed to generate corresponding zrender graphic elements and then rendered in canvas or SVG. The performance issue has been considered inside this procedure.
When I look at the generated code (for svg rendering), it looks like that symbol is repeated in the DOM multiple times (depending on how many times you want the symbol to be rendered). If we used an SVG sprite, we could cache the SVG symbol. You'd see a slight performance improvement if your chart contained a lot of symbols.
I don't think there would be much performance changes for canvas rendering though.
Thanks @ClemMakesApps . In canvas rendering, because the rendering mechanism is different, that probably not an issue. But for SVG rendering, that can be optimized.
General Questions
Issue Type
Issue Details
ECharts currently supports symbols if you pass in a SVG path (https://ecomfe.github.io/echarts-doc/public/en/option.html#series-line.symbol). It would be nice if we could pass in a svg sprite sheet URL with a specific svg ID so that we can use a cached svg path rather than having to add more svg paths to the DOM.
Expected Behavior
Current Behavior
Online Example
Topics
Anything Else We Need to Know
Environment
ECharts version;ECharts 版本: {DESCRIBE_HERE}
[ ] It happens only on certain browsers or operating systems. 对于特定浏览器或操作系统才会出现的问题,请提供相应环境信息:{BROWSER_VERSION_OR_OS_INFORMATION_HERE}