Closed DougBurke closed 10 years ago
Thanks for the report. This appears to be a problem introduced with the migration to diagrams version 1.0.
Are you able to confirm that the problem is resolve by reverting to an older version of diagrams? You should be able to do this by constraining diagrams-core to version 0.7.0.1.
Yes, the SVG output from the diagrams back end is correct if I change the cabal file to
-- Chart >= 1.2 && < 1.3,
-- Chart-cairo >= 1.2 && < 1.3,
-- Chart-diagrams >= 1.2 && < 1.3
diagrams-core == 0.7.0.1, Chart, Chart-cairo, Chart-diagrams
and then do a complete re-install, so that I have
% cabal sandbox hc-pkg list | egrep 'Chart|diagram'
Chart-1.2
Chart-cairo-1.2
Chart-diagrams-1.2
diagrams-core-0.7.0.1
diagrams-lib-0.7.1.1
diagrams-postscript-0.7.0.2
diagrams-svg-0.8.0.2
I've created a new gist with the SVG diagrams output for the diagrams-core-0.7.0.1
: https://gist.github.com/8923417
It looks indeed like it is a problem with the svg driver in 1.0 diagrams. The issue is here:
https://github.com/diagrams/diagrams-svg/issues/43
and associated discussion here:
http://projects.haskell.org/pipermail/chart/2014-February/000169.html
Ta for the info - Doug
On Wed, Feb 12, 2014 at 6:55 AM, Tim Docker notifications@github.comwrote:
It looks indeed like it is a problem with the svg driver in 1.0 diagrams. The issue is here:
diagrams/diagrams-svg#43https://github.com/diagrams/diagrams-svg/issues/43
and associated discussion here:
http://projects.haskell.org/pipermail/chart/2014-February/000169.html
Reply to this email directly or view it on GitHubhttps://github.com/timbod7/haskell-chart/issues/19#issuecomment-34861855 .
This issue should be fixed in diagrams-svg-1.0.2
, which comes with the latest release of diagrams (diagrams-1.1
).
Since diagrams-lib-1.1
depends on lens==4.0.*
then I think this will have to wait until the lens-4.0 changes are added back in to Chart. Or at least I couldn't build Chart with the new version of diagrams because of this constraint.
I've opened https://github.com/timbod7/haskell-chart/pull/25 which updates Chart to work with the new version of diagrams. Note no changes were required to allow Chart to build with lens-4.0
; only some small changes were needed to make it compatible with diagrams-lib-1.1
.
Looks like this problem is sorted - thanks Brent.
Filled circles (whether opaque or not) are not displayed by the diagrams SVG backend but are by the Cairo one. The code and output I get can be found at https://gist.github.com/DougBurke/8889814
The output file
circles-cairo.svg
has an orange line with filled circles (green, partly transparent) with a black outline. The diagrams version (circles-diagrams.svg
) has the orange line and black circles, but no green fill (also tried using a fully opaque green for the fill and it also fails to be displayed).I don't know if this is an issue with the backend code (i.e. chart) or the diagrams library itself.
Here's my package database contents and ghc/os version: