Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
DSDD
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

DSDD_0-1605106067942.png

Slider value 70, other selection

DSDD_1-1605106169477.png

Other Selection, other slider value:

DSDD_2-1605106228917.png

 

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
dplr-rn
Partner - Master III
Partner - Master III

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

DSDD
Contributor III
Contributor III
Author

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()

DSDD_0-1605112730620.png

 

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?