pygal
pygal copied to clipboard
Line chart: stroke_style doesn't work for serie
Since 3.0.0 (installed via pip) the parameter stroke_style within a line chart doesn't work anymore. Do you experienced the same issue? What is your proposal? Downgrad to an older version? Example:
chart.add("Serie", df.to_list(), dots_size=4, stroke_style={'width': 3})
This is a bug caused by this commit: https://github.com/Kozea/pygal/commit/51a96d34bf81c54256539e9528f41b7a8ab95dc2
It's exactly as @cbeytas described it in the comment there -- stroke_width
set from a Style
is applied with more specificity and thus overrides the options set by stroke_style
.
You can hot-patch this locally by removing those lines from style.css
, or you can write a Style
that sets the width that you want. More generally, that commit should probably be reverted and a better thought-out solution implemented.