Check out the LimeSurvey source code on GitHub!

Assigning a specific color to answers in pie chart

5 years 8 months ago - 5 years 8 months ago #61319 by theZ
I would like to a pie chart with specific colors for certain answers, this way there is consistency across all answers when looking at reports.

I was able to initially accomplish this by editing the color palette in limesurvey.pal, works perfectly as long as the number of answers is the same, but some questions dont have any answers for some of the options and the piechart uses the next color in the list.

a simple solution would be to have a way to show answers with zero responses represented in the piechart (0% is fine)I realize it wont show any color in the piechart itself, but it would serve as a placeholder for the color, so the colors will still match the other in limesurvey.pal

In case I wasnt clear above here is what i want to accomplish:
Lets say I have a question with 5 answers: air, wind, water, earth, fire.
In the pie chart answesr I want water to always be blue, and fire to always be red, etc... regardless of the fact a particlar answer might only have earth and water, and another only fire and wind... i want the colors to always be the same in the pie chart.

is this possible?
Last Edit: 5 years 8 months ago by theZ.

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form