NPS Colorscale in Limesurvey?

Más
8 meses 1 día antes #183259 por LimeRay
Hi,
I have made myself a NPS (Net Promotor Score) survey and it works just fine.
When I browsed for some help I came across this Add Colors in question"Add Colors in questions" And it got me thinking.
Would it be possible to make an array question look like the attached file?



I have been trying to split the "headerrow in my question" but not been lucky yet. The closest I've gotten so far is



I don't care for the emojis but I would love if the "colorbar could be as one"

Thanks for any help in advance!
Adjuntos:

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

LimeSurvey Partners
Más
7 meses 4 semanas antes #183331 por tpartner
Respuesta de tpartner sobre el tema NPS Colorscale in Limesurvey?
LimeSurvey version?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
7 meses 4 semanas antes #183341 por LimeRay
Respuesta de LimeRay sobre el tema NPS Colorscale in Limesurvey?
Version 3.7

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
7 meses 4 semanas antes - 7 meses 4 semanas antes #183356 por tpartner
Respuesta de tpartner sobre el tema NPS Colorscale in Limesurvey?
You can do it with a combination of JavaScript and CSS.

Add something like this script to the question source:

<script type="text/javascript" charset="utf-8">
 
	$(document).on('ready pjax:scriptcomplete',function(){
 
		// Identify this question
		var thisQuestion = $('#question{QID}');
 
		// Add a question class
		thisQuestion.addClass('custom-array');
 
		// Column-specific classes
		$('table.subquestion-list tr', thisQuestion).each(function(i) {
			$('th, td', this).each(function(i) {
				$(this).addClass('column-'+i);
			});
		});
 
		// Listener on the radios
		$('input:radio', thisQuestion).on('click', function(i) {
			$(this).closest('tr').find('.active-item').removeClass('active-item');
			$(this).closest('td').addClass('active-item');
		});
	});
</script>

Add some CSS rules like this to the question source (or custom.css file):

<style type="text/css">
	.custom-array table.subquestion-list thead td,
	.custom-array table.subquestion-list thead th {
		border-bottom-width: 8px;
		border-bottom-style: solid;
	}
 
	.custom-array table.subquestion-list thead .column-1 { border-bottom-color: #00A800; }
	.custom-array table.subquestion-list thead .column-2 { border-bottom-color: #5AC100; }
	.custom-array table.subquestion-list thead .column-3 { border-bottom-color: #9DD600; }
	.custom-array table.subquestion-list thead .column-4 { border-bottom-color: #9CE400; }
	.custom-array table.subquestion-list thead .column-5 { border-bottom-color: #E2EC00; }
	.custom-array table.subquestion-list thead .column-6 { border-bottom-color: #ECEC00; }
	.custom-array table.subquestion-list thead .column-7 { border-bottom-color: #ECE200; }
	.custom-array table.subquestion-list thead .column-8 { border-bottom-color: #E4C900; }
	.custom-array table.subquestion-list thead .column-9 { border-bottom-color: #D69D00; }
	.custom-array table.subquestion-list thead .column-10 { border-bottom-color: #C15A00; }
	.custom-array table.subquestion-list thead .column-11 { border-bottom-color: #A80200; }
 
	.custom-array td.column-1:hover,
	.custom-array td.active-item.column-1 { background-color: #00A800; }
 
	.custom-array td.column-2:hover,
	.custom-array td.active-item.column-2 { background-color: #5AC100; }
 
	.custom-array td.column-3:hover,
	.custom-array td.active-item.column-3 { background-color: #9DD600; }
 
	.custom-array td.column-4:hover,
	.custom-array td.active-item.column-4 { background-color: #9CE400; }
 
	.custom-array td.column-5:hover,
	.custom-array td.active-item.column-5 { background-color: #E2EC00; }
 
	.custom-array td.column-6:hover,
	.custom-array td.active-item.column-6 { background-color: #ECEC00; }
 
	.custom-array td.column-7:hover,
	.custom-array td.active-item.column-7 { background-color: #ECE200; }
 
	.custom-array td.column-8:hover,
	.custom-array td.active-item.column-8 { background-color: #E4C900; }
 
	.custom-array td.column-9:hover,
	.custom-array td.active-item.column-9 { background-color: #D69D00; }
 
	.custom-array td.column-10:hover,
	.custom-array td.active-item.column-10 { background-color: #C15A00; }
 
	.custom-array td.column-11:hover,
	.custom-array td.active-item.column-11 { background-color: #A80200; }
</style>

Sample survey attached:

Archivo Adjunto:

Nombre del Archivo: limesurvey...4-15.lss
Tamaño del Archivo:22 KB

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com
Adjuntos:
Última Edición: 7 meses 4 semanas antes por tpartner.
El siguiente usuario dijo gracias: krosser

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
7 meses 4 semanas antes #183358 por LimeRay
Respuesta de LimeRay sobre el tema NPS Colorscale in Limesurvey?
Tony, this was unbelievably good!!!
A huge thank you! You have just made my day!

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
7 meses 3 semanas antes #183393 por holch
Respuesta de holch sobre el tema NPS Colorscale in Limesurvey?
Didn't work for me when used in the question text, will need to make a test with a special template. could be helpful in the future.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
7 meses 3 semanas antes #183399 por tpartner
Respuesta de tpartner sobre el tema NPS Colorscale in Limesurvey?
@holch, did you try the sample .lss?

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
7 meses 3 semanas antes #183403 por holch
Respuesta de holch sobre el tema NPS Colorscale in Limesurvey?
Yes, imported your sample LSS and pasted the CSS code into the question text. No colors appeared. Will need to check with a custom template. Maybe the problem is actually the template. I used bootstrap. Will need to check a little bit further today.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
7 meses 3 semanas antes #183404 por tpartner
Respuesta de tpartner sobre el tema NPS Colorscale in Limesurvey?
Hmm...both JS and CSS are already in the question source in that .lss. You shouldn't need to paste anything.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
7 meses 3 semanas antes #183405 por holch
Respuesta de holch sobre el tema NPS Colorscale in Limesurvey?
OK, the problem was the missing Javascript. I somehow had the impression that the Javascript must already be there, but the CSS needs to be pasted.

I don't know why, but when I imported the LSS there was no CSS and no JS in the question text. However, the Editor was on as default, might have deleted the CSS and the JS. Strange. Will try to import it again and see what happens.

At least I am sure that I did NOT delete it personally, because the first thing I did when importing I previewed the question and nothing happend. Then I went in to put the scripts.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
7 meses 3 semanas antes #183406 por holch
Respuesta de holch sobre el tema NPS Colorscale in Limesurvey?
By the way: Looks pretty great! (besides my personal dislike of the NPS as a sole measure, but that is a different topic ;-) )

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
7 meses 3 semanas antes #183417 por jelo
Respuesta de jelo sobre el tema NPS Colorscale in Limesurvey?

holch escribió: Will try to import it again and see what happens.

Was the import issue reproducible?

The meaning of the word "stable" for users
www.limesurvey.org/forum/development/117...ord-stable-for-users

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
7 meses 3 semanas antes #183426 por holch
Respuesta de holch sobre el tema NPS Colorscale in Limesurvey?
I did a quick import again and the colors don't show in preview, but somehow the code shows in the question.

Unfortunately I did it in between other things, stopped a while, went back, etc. So I can't really tell 100% what I did, etc.

But I can tell one thing: After importing the LSS file and looking at the preview, the colors don't show. When I did insert the codes from the post manually, the colors showed.

Will see if I find some time to test over the holiday with a little bit more controlled settings and a clearer approach to check what is happening.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
7 meses 3 semanas antes #183429 por tpartner
Respuesta de tpartner sobre el tema NPS Colorscale in Limesurvey?
Hmm...I just imported to 3.17 and it worked as expected without any editing.

Cheers,
Tony Partner

Solutions, code and workarounds presented in these forums are given without any warranty, implied or otherwise.
Official LimeSurvey Partner - partnersurveys.com

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

Más
7 meses 3 semanas antes #183430 por holch
Respuesta de holch sobre el tema NPS Colorscale in Limesurvey?
As I said, I will do a new test when things are calmer and I can focus purely on this, not doing 3 things at the same time. Might be something I did, might be something with my installation (though it is the latest version, updated right before I imported this LSS for the first time).

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds

Por favor, Identificarse o Crear cuenta para unirse a la conversación.

¡Comenzar ahora!

Simplemente cree una cuenta y comience a usar LimeSurvey hoy mismo.

Registrarse ahora
¡Únase a nuestro boletín informativo!

Iniciar sesión