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

SVG doesn't display #8

Open
floatingheads opened this issue Apr 16, 2021 · 7 comments
Open

SVG doesn't display #8

floatingheads opened this issue Apr 16, 2021 · 7 comments

Comments

@floatingheads
Copy link

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.

@gety9
Copy link

gety9 commented Sep 13, 2021

@floatingheads i have exactly the same issue on Windows, did you find the solution?

@floatingheads
Copy link
Author

@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.

@gety9
Copy link

gety9 commented Sep 13, 2021

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%"/>

@gety9
Copy link

gety9 commented Sep 16, 2021

@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)

?

@floatingheads
Copy link
Author

@gety9 changing the img src as you suggested worked for me as well.

@redstreet
Copy link

redstreet commented Sep 17, 2021

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.

@erpreciso
Copy link
Contributor

@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.

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

No branches or pull requests

4 participants