terezka / elm-charts

Create SVG charts in Elm.
https://www.elm-charts.org
BSD 3-Clause "New" or "Revised" License
698 stars 67 forks source link

Line charts printed as PDF show phantom lines when viewed in Chrome #114

Open jhbrown-veradept opened 2 years ago

jhbrown-veradept commented 2 years ago

A chart printed to PDF can show a phantom line when viewed in Chrome. Here is a close-up view near the origin, note the faint line:

image

This snapshot is taken from the second page of the attached PDF file.

I believe this is actually due to a known bug in Chrome -- https://bugs.chromium.org/p/chromium/issues/detail?id=1201141&q=svg%20pdf&can=2

The line does not appear when I view the PDF in Mac preview, or in Safari, or in Firefox.

Given the ubiquity of Chrome, I am wondering: might the workaround suggested in the bug report might be usable in elm-charts, specifically "replacing "stroke: transparent" with "stroke: none" as a workaround"?

Finally, thank you for elm-charts, it makes my life better!

demo.pdf