Is it possible display statistics (graphs) on Text Display question?

More
4 years 6 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 =)

Please Log in to join the conversation.

LimeSurvey Partners
More
4 years 6 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

Please Log in to join the conversation.

More
4 years 6 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:

Please Log in to join the conversation.

More
4 years 6 months ago #128407 by coeneisma
No need to: you can use simple EM-code to dynamically populate the table :)

Please Log in to join the conversation.

More
4 years 6 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?

Please Log in to join the conversation.

More
4 years 6 months ago #128410 by coeneisma
The following user(s) said Thank You: h1ghland3r

Please Log in to join the conversation.

More
4 years 6 months ago #128411 by h1ghland3r

coeneisma wrote: Tomorrow. Busy today. Coen

I'll wait, thanks!

Please Log in to join the conversation.

More
4 years 6 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

Please Log in to join the conversation.

More
4 years 6 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
Attachments:
The following user(s) said Thank You: tpartner, Ben_V, crafter, h1ghland3r, mentalhealthamerica

Please Log in to join the conversation.

More
4 years 6 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)

Please Log in to join the conversation.

More
4 years 6 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.

Please Log in to join the conversation.

More
4 years 6 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?

Please Log in to join the conversation.

More
4 years 6 months ago #128498 by coeneisma
Quit sure there is something wrong with the question integrity. Check the logic file for errors.

In the attachment an example of added anwer values to the text:
Attachments:

Please Log in to join the conversation.

More
4 years 6 months ago #128530 by h1ghland3r

coeneisma wrote: Quit sure there is something wrong with the question integrity. Check the logic file for errors.

In the attachment an example of added anwer values to the text:


I uploaded your new example and I took a look. I will come back to my survey later and try to understand what I am doing wrong.

Please Log in to join the conversation.

More
4 years 5 months ago #129388 by ordogz
Thank you coeneisma for sharing this google chart based solution to represent data(scores) in a limesurvey. I imported your limesurvey question group file inside my survey and I changed from Pie chart to Bar chart with my own data and it worked well everything.
But I have one question: because I generated everything regarding the scores in the "end message" , I would love to represent the google based chart inside the end message , below the results table(averages, calculations and scores) in a smaller size. I don't know if it's possible .

Thank you again.

Please Log in to join the conversation.

Start now!

Just create your account and start using Limesurvey today.

Register now