Welcome to the LimeSurvey Community Forum

Ask the community, share ideas, and connect with other LimeSurvey users!

Pie Chart fonts missing in PDF

More
7 years 3 months ago #168054 by deliot
Hello, when I print a Pie Chart in a PDF, there is no text, either for the legend, or for the "pie slice" percentages.

Any suggestions?





Example of a pie chart from a PDF:

The topic has been locked.
More
7 years 3 months ago #168059 by holch
The most basic information is missing: Which LS version? Without that, it will be very difficult to reproduce.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The topic has been locked.
More
7 years 3 months ago #168070 by deliot
Forgot...

Version 3.7.1+180424
Chrome Browser
Ubuntu 16.04 installation
The topic has been locked.
More
7 years 3 months ago #168071 by deliot
Also, here's what I get when I hover over the pie chart.


The topic has been locked.
More
6 years 10 months ago #174725 by gbl_amorim
Got the same problem here, did you solve it?
The topic has been locked.
More
6 years 10 months ago #174742 by DenisChenu

holch wrote: The most basic information is missing: Which LS version? Without that, it will be very difficult to reproduce.


Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. - Professional support - Plugins, theme and development .
I don't answer to private message.
The topic has been locked.
More
6 years 10 months ago - 6 years 10 months ago #174748 by gbl_amorim
Version: 3.14.5

I did some changes in the code and now I can show the legend, but they're wrong and still no percentage in any slice.


Edit: the legend isn't wrong but I would like to show the question text in the place of the numbers.

Edit2: I just figure out how to make the percentages work, in limesurvey\application\helpers\admin\statistics_helper.php where the 3D pie chart is created the "setFontProprieties" was poiting to '$rootdir."/fonts/".$chartfontfile', but the fonts are in '$rootdir."/assets/fonts/".$chartfontfile'. Now I just need to change te text.

Just a question, the option "graph type" was supposed to work just when i select html format or for pdf too? Because it doesn't, the graph type shown is the one i've set when creating the question.
Last edit: 6 years 10 months ago by gbl_amorim.
The topic has been locked.
More
6 years 10 months ago #174749 by holch

Edit2: I just figure out how to make the percentages work, in limesurvey\application\helpers\admin\statistics_helper.php where the 3D pie chart is created the "setFontProprieties" was poiting to '$rootdir."/fonts/".$chartfontfile', but the fonts are in '$rootdir."/assets/fonts/".$chartfontfile'. Now I just need to change te text.


Update to the latest version, see if the problem persists. If it persists: make a bug report. Your changes might be overwritten by any future update you might make, so I think it is best that it is fixed in the core, rather than you hacking the code. Might be a temporary solution, but is not future proof.

Help us to help you!
  • Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
  • Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
The following user(s) said Thank You: DenisChenu, gbl_amorim
The topic has been locked.
More
6 years 4 months ago #183528 by deliot
So a year later I still have the same issue! Thankfully, I found the problem, and set up a workaround.

ISSUE: PDF legends on pie graphs and other graphs have no text. I found the problem by setting debug to "2" in the config.php file. This showed a number of PHP warnings linked to pChart.class.php and specifically a link to a missing file found along the path /HOMEDIR/fonts/DejaVuSans.ttf. It turns out that there is no fonts folder in this location, but there is one along the path /HOMEDIR/assets/fonts/DejaVuSans.ttf. I'm guessing this is because I have upgraded (properly) a number of times, and somehow the MySQL database still has a reference to the old path.

WORK AROUND: For now, I just created a symbolic link so that /fonts points to /assets/fonts. At some later date, perhaps I'll track down the error in the database.

NOTE: This seems somehow related to this bug report: bugs.limesurvey.org/view.php?id=13338

My current LimeSurvey version 3.16.1+
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose