question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dashed lines do not appear as dashed in the legend.

See original GitHub issue

It 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.

influenza-like illness_ incidence of gp consultations by season

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:open
  • Created 5 years ago
  • Reactions:2
  • Comments:11 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
cvetkovivancommented, Jul 7, 2020

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'

1reaction
Oviliacommented, Dec 11, 2018

@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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found