Qlik Community

App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Join “Do More With Qlik” with Mike Tarallo to get a first-hand look at the New Authoring Experience, June 29th: REGISTER HERE
Showing results for 
Search instead for 
Did you mean: 
Contributor III
Contributor III

Reactive bar chart - Legend order flipping

Dear Community,

i created a reactive bar chart. The problem is that the legend order respectively the color of the groups flip arbitrarily dependig on the users selection via a slider.

Example slider value 30


Slider value 70, other selection


Other Selection, other slider value:



On what does this depend? Does it depend on the first data row of the result?

How can i define the desired order and desired color??

Caveat: The Grouping dimension depends on a reactive variable.


Thanks in advance

Labels (3)
2 Replies

hard to diagnose without more details but most likely due to your sort order 

Contributor III
Contributor III

Sort order of what? Is there any possibility to define an order within a reactive calculation?

 The code for the group-dimension in my bar chart is written in R included in R.ScriptEval()



Lets say the two levels of my grouping variable are "bottom" and "top". But my output-column depending on the reactive input value not necessarily contains both.

Is there a chance to define the order, maybe within a variable?