hughess opened a new issue #15949: URL: https://github.com/apache/echarts/issues/15949
### Version 5.2.1 ### Reproduction link [https://jsfiddle.net/eb9dz2f3/3/](https://jsfiddle.net/eb9dz2f3/3/) ### Steps to reproduce 1. Add line width to template, but store it as a string (same as the output from ECharts theme builder) 2. Use SVG renderer 3. Change `grid: top` argument until the line stops appearing (in example link, changing it to 17% makes the line disappear, but 18% works) ### What is expected? Line should render as normal ### What is actually happening? Line doesn't render under both of these conditions: - Renderer is SVG - Certain values are inputted into the grid: top argument --- This is a strange issue. A line chart I built stopped rendering the line, but I was able to get a bar and scatter to work with the same data. I had the line working earlier and the only thing I changed to break it was the `grid: top` argument. After playing around with different values for that argument, I found that some numbers worked while others didn't. I checked the renderer and this is an issue specific to SVG - the chart works as normal with Canvas. My assumption was that there is some strange rounding happening when it tries to calculate the position of the line. I couldn't find anything wrong with the underlying SVG elements on inspection in my browser, so the actual problem is a mystery to me. After looking further into it, I found that the line width option in my custom theme file was stored as a string instead of a number. Changing it to a number solved the SVG rendering problem. I built the custom theme using the ECharts theme builder, which outputs a string if you edit the line width option. I am not sure if this is an issue with the theme builder or SVG rendering, but wanted to share in case it's helpful to anyone else. Everything is working for me now. <!-- This issue is generated by echarts-issue-helper. DO NOT REMOVE --> <!-- This issue is in English. DO NOT REMOVE --> -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
