Dashed lines do not appear as dashed in the legend.
See original GitHub issueIt would be nice if the legend symbols adapted to the series symbols.
In my case, dashed lines do not appear as dashed in the legend.
By default we have this big circle in the middle of the line, I got rid of it with
symbol: 'line', symbolSize:0,
- I am using English in this issue. 在这个 Issue 中我使用了英文(强烈建议)。
- Required: I have read the document and examples and tried to solve it by myself. (必填)我读过了文档和教程,并且曾试图自己解决问题。
- Required: I have searched for similar issues and that didn’t help. (必填)我搜索过 issue 但是没有帮助。
- Required: I have tried with the latest version of ECharts and still have this problem. (必填)我试过最新版本的 ECharts,还是存在这个问题。
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Dashed lines do not appear as dashed in the legend. #9552
In my case, dashed lines do not appear as dashed in the legend. ... symbol: 'line', symbolSize:0,. I am using English in this...
Read more >Dashed Line in ggplot does not show up in the right style in ...
I work with ggplot and I have a problem with the legend. The dashed lines in the plot are not dashed in the...
Read more >ggplot2 dashed line in legend not appearing properly
I want to plot regression lines on a figure and then add a one to one line (1:1) on the figure too. The...
Read more >line thickness + linetype & legend: dashed lines don't show up
The issue is that the dashed linetype doesn't show up as dashed in the legend because (I believe) it's covered up by the...
Read more >Legend for dashed line - MATLAB Answers - MathWorks
I have plotted 6 different lines in my figure, 3 solid lines, and 3 dashed lines. When creating a legend however, all lines...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So, i found one solution.
EchartOptions.legend.data[] = {name: '', icon: ''}
You can add any icon to current data in your legend. Exapmle link: codepen. Also you can add svg icon. documantation.
No idea to resovle this problem by any other solution.
UPD: Dashed svg path:
'path://M180 1000 l0 -40 200 0 200 0 0 40 0 40 -200 0 -200 0 0 -40z, M810 1000 l0 -40 200 0 200 0 0 40 0 40 -200 0 -200 0 0 -40zm, M1440 1000 l0 -40 200 0 200 0 0 40 0 40 -200 0 -200 0 0 -40z'
Dotted svg path:'path://M335 1316 c-63 -28 -125 -122 -125 -191 0 -71 62 -164 127 -192 18 -7 58 -13 90 -13 72 0 125 28 168 88 27 39 30 52 30 117 0 65 -3 78 -30 117 -43 61 -95 88 -170 87 -33 0 -73 -6 -90 -13z, M1035 1313 c-76 -40 -115 -103 -115 -188 0 -121 85 -205 205 -205 121 0 205 84 205 205 0 84 -39 148 -112 186 -46 24 -140 25 -183 2z, M1714 1298 c-61 -42 -94 -102 -94 -173 0 -71 33 -131 94 -172 41 -28 57 -33 107 -33 76 0 115 16 161 68 76 84 76 190 0 274 -46 52 -85 68 -161 68 -50 0 -66 -5 -107 -32z'
@mathiasleroy Yes, that would be a great feature. In fact, we’d like to improve legend style not only with dashed lines, but also other features like line width, stroke styles.