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
  • h1ghland3r's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 11 months ago #128366 by h1ghland3r
Hi,

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 =)
The topic has been locked.
More
8 years 11 months ago #128374 by coeneisma
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.
The following user(s) said Thank You: tpartner, yang1070
The topic has been locked.
  • h1ghland3r
  • h1ghland3r's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 11 months ago #128388 by h1ghland3r

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:
The topic has been locked.
More
8 years 11 months ago #128407 by coeneisma
No need to: you can use simple EM-code to dynamically populate the table :)
The topic has been locked.
  • h1ghland3r
  • h1ghland3r's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 11 months ago #128409 by h1ghland3r

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?
The topic has been locked.
More
8 years 11 months ago #128410 by coeneisma
Tomorrow. Busy today. Coen
The following user(s) said Thank You: h1ghland3r
The topic has been locked.
  • h1ghland3r
  • h1ghland3r's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 11 months ago #128411 by h1ghland3r

coeneisma wrote: Tomorrow. Busy today. Coen

I'll wait, thanks!
The topic has been locked.
  • h1ghland3r
  • h1ghland3r's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 11 months ago #128464 by h1ghland3r

coeneisma wrote: Tomorrow. Busy today. Coen


Hi Coen. Can you help me this weekend?
The following user(s) said Thank You: Ben_V
The topic has been locked.
More
8 years 11 months ago #128465 by coeneisma
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
The following user(s) said Thank You: tpartner, Ben_V, crafter, h1ghland3r, mentalhealthamerica
The topic has been locked.
More
8 years 11 months ago #128475 by Ben_V
Thank you Coen, your survey sample will be very useful for other users... There is great things to do with GG charts... For whom interested in this, an old but still valid (about graphing daily survey participation) post may be found here ;)

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)
The topic has been locked.
  • h1ghland3r
  • h1ghland3r's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 11 months ago #128484 by h1ghland3r

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.
The topic has been locked.
  • h1ghland3r
  • h1ghland3r's Avatar Topic Author
  • Offline
  • Junior Member
  • Junior Member
More
8 years 11 months ago #128496 by h1ghland3r

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?
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose