- Posts: 26
- Thank you received: 1
Welcome to the LimeSurvey Community Forum
Ask the community, share ideas, and connect with other LimeSurvey users!
Is it possible display statistics (graphs) on Text Display question?
- h1ghland3r
- Topic Author
- Offline
- Junior Member
I'm working with a text display question as my last page before the survey submission . Is it possible to get graphs to be shown in that page?
For example, in the text display question, i'd like to say that the user checked 7 of 10 questions from a question group and 3 of 10 questions from another group displayed as a pie chart.
thanks
- coeneisma
- Offline
- Senior Member
- Posts: 74
- Thank you received: 26
An easy solution is to use Google Image Charts (Deprecated, do google search) for statical graphs or Google charts ( developers.google.com/chart/ ) for dynamic charts.
- h1ghland3r
- Topic Author
- Offline
- Junior Member
- Posts: 26
- Thank you received: 1
coeneisma wrote: Not as a build in EM function. If you can code you could do something with the build in pchart library. Something I was looking for also ( bugs.limesurvey.org/view.php?id=9751 ).
An easy solution is to use Google Image Charts (Deprecated, do google search) for statical graphs or Google charts ( developers.google.com/chart/ ) for dynamic charts.
That's bad news
I dont know PHP to try sth with pchart. I read about Google charts, and a particulary information give me a question:
"Rather than populate a table yourself, you could instead query a website that supports the Chart Tools Datasource protocol--for example, a Google Spreadsheets page. Using the google.visualization.Query object, you can send a query to a website and receive a populated DataTable object that you can pass into your chart."
The question is: LimeSurvey supports this protocol? The Google's example is (of course) Google spreadsheats. :silly:
- coeneisma
- Offline
- Senior Member
- Posts: 74
- Thank you received: 26
- h1ghland3r
- Topic Author
- Offline
- Junior Member
- Posts: 26
- Thank you received: 1
coeneisma wrote: No need to: you can use simple EM-code to dynamically populate the table
I know I am asking too much. But can you give an example using Expression Manager to do it?
- coeneisma
- Offline
- Senior Member
- Posts: 74
- Thank you received: 26
- h1ghland3r
- Topic Author
- Offline
- Junior Member
- Posts: 26
- Thank you received: 1
I'll wait, thanks!coeneisma wrote: Tomorrow. Busy today. Coen
- h1ghland3r
- Topic Author
- Offline
- Junior Member
- Posts: 26
- Thank you received: 1
coeneisma wrote: Tomorrow. Busy today. Coen
Hi Coen. Can you help me this weekend?
- coeneisma
- Offline
- Senior Member
- Posts: 74
- Thank you received: 26
Code is in attachment. Take a look at the second question group, which is where the magic happens.
More info on Google Charts on mentioned page.
Cheers, Coen
- Ben_V
- Offline
- Platinum Member
- Posts: 1128
- Thank you received: 329
Benoît
EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
Last Releases => 2.6x.x goo.gl/ztWfIV | 2.06/2.6.x => bit.ly/1Qv44A1
Demo Surveys => goo.gl/HuR6Xe (already included in /docs/demosurveys)
- h1ghland3r
- Topic Author
- Offline
- Junior Member
- Posts: 26
- Thank you received: 1
coeneisma wrote: Sure! You can find an example here: www.surveyonderzoek.nl/onderzoek/index.php/784284?lang=en
Code is in attachment. Take a look at the second question group, which is where the magic happens.
More info on Google Charts on mentioned page.
Cheers, Coen
Really thanks, Coen! I'll take a look right now.
- h1ghland3r
- Topic Author
- Offline
- Junior Member
- Posts: 26
- Thank you received: 1
coeneisma wrote: Code is in attachment. Take a look at the second question group, which is where the magic happens.
More info on Google Charts on mentioned page.
Cheers, Coen
@coeneisma,
The code works like a charm! Thanks one more time!
I have one more question though. Before using Javascript on my text display question, I was able to get the answers value using {B1} or {B1.shown} on the html. Now, it's only showing a text.
Before the Javascript:
i.imgur.com/oWf72Bm.png
Now:
i.imgur.com/KhlQxLd.png
I believe I need to use Javascript to get these answers. But how can I collect and show the answers?