Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linecap combined with dashStyle not working #17998

Closed
KamilKubik opened this issue Nov 18, 2022 · 4 comments · Fixed by #18041
Closed

Linecap combined with dashStyle not working #17998

KamilKubik opened this issue Nov 18, 2022 · 4 comments · Fixed by #18041

Comments

@KamilKubik
Copy link
Contributor

Expected behaviour

series.linecap property should be applied when series.dashStyle property is declared.

Actual behaviour

series.linecap property isn't applied when series.dashStyle property is declared.

Live demo with steps to reproduce

https://jsfiddle.net/BlackLabel/jpt2wrx7/

Product version

Highcharts v10.3.1

@karolkolodziej
Copy link
Contributor

Those two properties coexist in SVG (demo) and I don't see any reason why it should in the Highcharts.

Workaround:
Wrap applied to the drawGraphmethod- demo.

Internal note:
The else if should be split into the if.

if (prop[3]) {
attribs.dashstyle = prop[3] as any;
} else if (options.linecap !== 'square') {
attribs['stroke-linecap'] =
attribs['stroke-linejoin'] = 'round';
}

@MarkusBarstad
Copy link
Contributor

Quick question @karolkolodziej: Should the legend-symbol be rounded in case of rounded linecap?

@karolkolodziej
Copy link
Contributor

IMO legend should reflect the series so answering your question yes it should have also a rounded linecap.
@TorsteinHonsi what is your opinion?

@TorsteinHonsi
Copy link
Collaborator

Yes I think it should, ideally. Let's try to code it and see how it looks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants