Welcome to the LimeSurvey Community Forum

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

Display gauge chart at the end of assessment

More
5 years 2 months ago #202093 by karencheah
I would like to be able to run an assessment and display the total score at the end graphically, specifically as a gauge chart. I was looking into using Chart JS but I can't figure out how to add script into the End message or a text display question without breaking the whole survey.

Please advise what the options are (free/paid). Thanks in advance!
The topic has been locked.
More
5 years 2 months ago #202107 by tpartner
Here are some old instructions o how to use JavaScript - www.limesurvey.org/manual/Workarounds:_M...tc..29_in_LimeSurvey

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The topic has been locked.
More
5 years 2 months ago #202121 by karencheah
Thanks, Tony. I'll take a look and give it a go.
The topic has been locked.
More
5 years 2 months ago #202122 by karencheah
Unfortunately, the plugin is not compatible with LS version. I'm on Version 4.3.0+200616. Anymore ideas please?
The topic has been locked.
More
5 years 2 months ago #202130 by DenisChenu

karencheah wrote: Unfortunately, the plugin is not compatible with LS version. I'm on Version 4.3.0+200616. Anymore ideas please?

Plugin is not needed, it's an alternative.

(and yes : currently no way to have question attribute via plugins)

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
5 years 2 months ago #202144 by karencheah
Thanks, Denis. I turned off the "Filter HTML for XSS" in the global settings but I still couldn't add any javascript. So I thought that the plugin was needed.

I'm thinking of another idea that would maybe be easier than trying to do the chart within LS. What if I pass the score out as a parameter to another page where I will render the chart? The question is how to pass the score out...
The topic has been locked.
More
5 years 2 months ago #202152 by DenisChenu

karencheah wrote: Thanks, Denis. I turned off the "Filter HTML for XSS" in the global settings but I still couldn't add any javascript.

In 4.X you have a "script" block, maybe you can use it.

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
5 years 2 months ago #202167 by karencheah
Sorry, I can't seem to find this "script" block in the question or the settings. Also can't find any documentation on it.
The topic has been locked.
More
5 years 2 months ago - 5 years 2 months ago #202170 by DenisChenu
Else : you are in assesement,

Seems there are not HTML editor in 4.X


Just add

<script type="text/javascript" charset="utf-8">
alert("Test!");
</script>


And see what happen

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.
Last edit: 5 years 2 months ago by DenisChenu.
The topic has been locked.
More
5 years 2 months ago #202172 by karencheah
I've tried it in the question text and the end message in source code. Both didn't like it.
The topic has been locked.
More
5 years 2 months ago #202173 by karencheah
I've also turned off assessment mode.
The topic has been locked.
More
5 years 2 months ago #202174 by tpartner
Are there any JavaScript errors in the console (F12)?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
The following user(s) said Thank You: DenisChenu
The topic has been locked.
More
5 years 2 months ago #202181 by DenisChenu
Are you super admin ?

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
5 years 2 months ago #202222 by karencheah
I'm pretty sure I'm super admin as there are no other users. I'll log in and check soon. As well as paste the error messages of when I put in script.
The topic has been locked.
More
5 years 2 months ago #202223 by karencheah
I'm the only user and it says administrator next to my user. Not sure where to check if super admin but it should be.

I'm attaching screenshots of the issues. First 2 images are when I pasted the script in a text display question. When saving, it just breaks the page and doesn't save it. The last image is when I pasted script into End message.
Moderators: tpartnerholch

Lime-years ahead

Online-surveys for every purse and purpose