Welcome to the LimeSurvey Community Forum

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

generating a bar chart in the second question basing on the first question's ans

  • LISHANGQI
  • LISHANGQI's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 6 months ago #222859 by LISHANGQI
Please help us help you and fill where relevant:
Your LimeSurvey version: [3.27.24]
Own server or LimeSurvey hosting: Own server
Theme: generating a bar chart in the second question based on the answer of the first question
==================
[Write here your question/remark]


Dear all, 

I'll have my last try to find a solution for one of my problems.  

In general, I'm designing a Stated adaptation experiment about the usage of a new transport service. 

In the first question, I'll ask respondents to report a travel time, for example, "6mins" for one of their reported journeys.

In the second question, I want to show a bar chart to the respondent to tell them: For this journey, if you choose the new transport mode, the possible travel time will be:
  50%             30%       20%
5mins           7mins   12 mins 
 The three numbers( 5, 7,12) are precalculated by myself (since I think it's too complicated to let Limesurvey calculate it), something like: (If Q1==6, 5mins 7 mins 12mins). 

I have no knowledge of javascript or Html or CSS design, therefore I'd like to ask if it's possible to generate this graph?  I'll very much appreciate it if you can tell help me with this question or even tell me if it's possible to be achieved by javascript or HTML or CSS or something that I don't know the name:)

Thanks again for your attention. 

Best regards,
LSQ

 
Attachments:
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago #222861 by Joffm
Quick answer:
Yes.
I prefer to use "Highcharts"
[url] www.highcharts.com [/url]

Have a look at the demos. 
[url] www.highcharts.com/demo [/url]

Here a quick example taken from these demos without any further styling.
 

So you may show more detailled what you are going to do.

Joffm
 

Volunteers are not paid.
Not because they are worthless, but because they are priceless
The following user(s) said Thank You: LISHANGQI
The topic has been locked.
  • LISHANGQI
  • LISHANGQI's Avatar Topic Author
  • Offline
  • Senior Member
  • Senior Member
More
3 years 6 months ago #222872 by LISHANGQI
Thank you very much Joffm, you are always very helpful! I'll discuss this with my professor and make a sample survey.
The topic has been locked.
  • tammo
  • tammo's Avatar
  • Offline
  • Official LimeSurvey Partner
  • Official LimeSurvey Partner
More
3 years 6 months ago #222893 by tammo
Joffm,

could you elaborate a little more on this? Perhaps one of your Masterclasses, like you did on different question types?

It would be of great help for me an probably many others....

Tammo


Tammo ter Hark at Respondage
For Limesurvey reporting, education and customized themes
respondage.nl
The topic has been locked.
  • Joffm
  • Joffm's Avatar
  • Offline
  • LimeSurvey Community Team
  • LimeSurvey Community Team
More
3 years 6 months ago - 3 years 6 months ago #222933 by Joffm
Hi, Tammo,
really there is a chapter in "Tutorial 3: Gimmicks". But... German.

Here an example to display the distribution of values in an array and a calculated score of them
 

 

File Attachment:

File Name: limesurvey...5596.lss
File Size:28 KB


Joffm

Volunteers are not paid.
Not because they are worthless, but because they are priceless
Last edit: 3 years 6 months ago by Joffm.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • LimeSurvey Community Team & Official Partner
  • LimeSurvey Community Team & Official Partner
More
3 years 6 months ago #222982 by DenisChenu
YOU ROCK !

 


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
3 years 4 months ago #224375 by letpa
Hi Joffm,
Thank you for your example, it works fine.
I tried to put this chart in a pdf using pdf report with <img src="{Q3.NAOK}" /> but not working. Is there a way to do it ?
Thank you
The topic has been locked.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose