beangrow
beangrow copied to clipboard
SVG doesn't display
For some reason the SVG files do not load in the browser via index.html for any of the group reports. I have tried Chrome, Edge, and Internet Explorer. I can open the SVG files individually in all 3 of those browsers with no issue, but they stubbornly don't want to load via the html. I'm on a Windows machine if that matters.
@floatingheads i have exactly the same issue on Windows, did you find the solution?
@gety9 I didn't find a solution. I've just been looking at the tables without worrying about it. If I care enough about the graphs, then I can manually open them.
Issue is caused by wrong image reference inside HTML file.
If html file is meant to be served by localhost (similar to what fava is doing) then it's correct, but since here we open local file (similar to bean bake) then we need change image reference in index.html:
from
<img src=out\groups\currency.XXXX\flows.svg style="width: 100%"/>
<img src=out\groups\currency.XXXX\cumvalue.svg style="width: 100%"/>
to simply
<img src=flows.svg style="width: 100%"/>
<img src=cumvalue.svg style="width: 100%"/>
@redstreet are you linux user?
If yes, could you please tell:
- if svg files are displayed for you
- what do you have after "<img src=" in generated index.html (lines 32 and 33)
?
@gety9 changing the img src as you suggested worked for me as well.
Agree, this is definitely an issue that needs to be fixed in the code, as I believe the common use case is to simply open up the files locally. @blais would you agree?
Yes, I'm a Linux user and the src= line incorrectly includes a long base path instead of just the file like @gety9 shows above. PR would be appreciated.
@redstreet @floatingheads @blais I created pull request #15 to fix this above, changing the img src path written by report.py in index.html. Hope it helps.