Check out the LimeSurvey source code on GitHub!
Welcome, Guest
Username: Password:

TOPIC: Can I use pchart to display grahp in the END MESSAGE?

Can I use pchart to display grahp in the END MESSAGE? 2 years 8 months ago #103027

  • mrli999
  • mrli999's Avatar
  • Offline
  • Expert Lime
  • Posts: 139
  • Thank you received: 2
  • Karma: 0
Can I use pchart to display grahp in the END MESSAGE?

If yes, what should I do? Fox example, if I get five scores(a,b,c,d,e) through Equation. I just want to draw a bar graph to show that five socres. The serial labels can be score one, score two, score three, score four,score five.


Thanks.
The administrator has disabled public write access.

Can I use pchart to display grahp in the END MESSAGE? 2 years 8 months ago #103043

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9346
  • Thank you received: 1338
  • Karma: 386
Hi,

Not directly, pchart is a PHP system.

But you can
- Use a JS system (www.jqplot.com/ or www.highcharts.com/ or www.jscharts.com/ or ...)
- Do a plugin using 'afterSurveyComplete ' event

Denis
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
Last Edit: 2 years 8 months ago by DenisChenu.
The administrator has disabled public write access.
The following user(s) said Thank You: mrli999

Can I use pchart to display grahp in the END MESSAGE? 2 years 8 months ago #103045

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1825
  • Thank you received: 449
  • Karma: 111
Use a JS system (www.jqplot.com/ or www.highcharts.com/ or ...)

or... the very light and easy to use jscharts.com
.
Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => bit.ly/20NW9V8 (already included in /docs/demosurveys)
The administrator has disabled public write access.
The following user(s) said Thank You: mrli999

Can I use pchart to display grahp in the END MESSAGE? 2 years 8 months ago #103052

  • mrli999
  • mrli999's Avatar
  • Offline
  • Expert Lime
  • Posts: 139
  • Thank you received: 2
  • Karma: 0
DenisChenu wrote:
Hi,

Not directly, pchart is a PHP system.

But you can
- Use a JS system (www.jqplot.com/ or www.highcharts.com/ or www.jscharts.com/ or ...)
- Do a plugin using 'afterSurveyComplete ' event

Denis

thank you very much. I download jschart from it's website. Another question, which folder shoud I put jschart to?
The administrator has disabled public write access.

Can I use pchart to display grahp in the END MESSAGE? 2 years 8 months ago #103058

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1825
  • Thank you received: 449
  • Karma: 111
...which folder shoud I put jschart to?

your instalation "scripts" folder is probably the best place :)
Nevertheless, you can add your js file(s) wherever you want either in your "upload" directory or template folder
.
Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => bit.ly/20NW9V8 (already included in /docs/demosurveys)
The administrator has disabled public write access.
The following user(s) said Thank You: mrli999

Can I use pchart to display grahp in the END MESSAGE? 2 years 8 months ago #103063

  • mrli999
  • mrli999's Avatar
  • Offline
  • Expert Lime
  • Posts: 139
  • Thank you received: 2
  • Karma: 0
Ben_V wrote:
...which folder shoud I put jschart to?

your instalation "scripts" folder is probably the best place :)
Nevertheless, you can add your js file(s) wherever you want either in your "upload" directory or template folder
.

thank you very much!Success.
The administrator has disabled public write access.

Can I use pchart to display grahp in the END MESSAGE? 2 years 8 months ago #103065

  • mrli999
  • mrli999's Avatar
  • Offline
  • Expert Lime
  • Posts: 139
  • Thank you received: 2
  • Karma: 0
Ben_V wrote:
...which folder shoud I put jschart to?

your instalation "scripts" folder is probably the best place :)
Nevertheless, you can add your js file(s) wherever you want either in your "upload" directory or template folder
.

sometimes when using java in the end message, limesurvey will add a unnessary span to the value. then I can't get the correct graph. please see my post www.limesurvey.org/en/forum/can-i-do-thi...-the-end-message-box

would you please let me know how to resolve this question? thank again.
The administrator has disabled public write access.

Can I use pchart to display grahp in the END MESSAGE? 2 years 8 months ago #103108

  • DenisChenu
  • DenisChenu's Avatar
  • Offline
  • Moderator Lime
  • Posts: 9346
  • Thank you received: 1338
  • Karma: 386
Hi,

You can (it's an hack)
Do:
<div style="display:none>
<div id="mycode">{MYCODE}</mycode>
...
</div>
<script>
$(function() {
// Fill the js var
var mycode=$("#mycode").text();
}
</script>
Because if you use js: you only have to have a god js var.

Denis
Assistance on LimeSurvey forum and LimeSurvey core developpement are on my free time (Say thanks ?).
A bug not reported is a bug not corrected. | Please, read the documentation | La doc en français à besoin de vous
The administrator has disabled public write access.

Can I use pchart to display grahp in the END MESSAGE? 1 year 4 months ago #120475

  • ordogz
  • ordogz's Avatar
  • Offline
  • Fresh Lemon
  • Posts: 14
  • Karma: 0
Hi!

It's possible to insert charts to show the scores on the results page, after the user clicking the sumbit button ? Thank you
The administrator has disabled public write access.

Can I use pchart to display grahp in the END MESSAGE? 1 year 4 months ago #120477

  • Ben_V
  • Ben_V's Avatar
  • Offline
  • Platinum Lime
  • Posts: 1825
  • Thank you received: 449
  • Karma: 111
"end message" is included on the "results page" ( {COMPLETED} placeholder replacement in completed.pstpl file )

As well you can add some javascript into assessments rules or assessment.pstpl file if assessment module is turned on for your survey...

So your question is already answered in this discussion (#103043)
Benoît

EM Variables => bit.ly/1TKQyNu | EM Roadmap => bit.ly/1UTrOB4
All LS releases => bit.ly/1VMuTDu | 2.06lts => bit.ly/1Qv44A1
Demo surveys => bit.ly/20NW9V8 (already included in /docs/demosurveys)
The administrator has disabled public write access.

Can I use pchart to display grahp in the END MESSAGE? 3 months 2 weeks ago #137644

Saludos Ben_V.

Deseo personalizar los gráficos estadísticos o crear nuevos con los resultados de una de mis encuestas y leí tu mensaje. Me puedes dar una ayuda de como hacerlo?

Gracias,

JULIO CESAR
The administrator has disabled public write access.

Can I use pchart to display grahp in the END MESSAGE? 3 months 2 weeks ago #137648

  • holch
  • holch's Avatar
  • Offline
  • LimeSurvey Team
  • Posts: 5171
  • Thank you received: 769
  • Karma: 230
Please do not use Spanish in the English forum responding to an English thread.
Por favor, no usar Español en una pregunta en Ingles en el foro en Ingles.
Have a look at the manual! It is a really valuable source for information. Here some helpful links:
Manual (EN) | Question Types | Question Attributes | Workarounds

If you found this answer helpful and it saved you some time please consider a donation to the project to keep Limesurvey going!
The administrator has disabled public write access.
The following user(s) said Thank You: DenisChenu
Time to create page: 0.409 seconds
Imprint                   Privacy policy                  Revocation information and revocation form