Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Ordering Stacked Bar Chart

Hi everyone,

I have a stacked bar chart with time on the x-axis and a count of different names on the y. I want to re-order the stack on each bar according to something I specify. At the moment QV is ordering the stack components according to some automatic stacking process by default.

Thank you

1 Solution

Accepted Solutions
ashwanin
Specialist
Specialist

LOAD * INLINE [

Value Rank

YZ      1

GY     2

YY     3

GY     4] ;  and then do shorting in Graph.

View solution in original post

11 Replies
Not applicable
Author

QV stacked chart pic.jpg

Assuming the stack ordering defaults to the following, I would like to override the order so that YX is at the top, followed by GY, YY and XG.

jsingh71
Partner - Specialist
Partner - Specialist

Hi,

Go to chart properties and then expression. You rearrenge your expreesion in the way you want to show in your chart.

The first(top) expreesion which you select in expreesion , it will be the lowest color in bar.

arrange.png

Not applicable
Author

Hi,

Thank you for your response. I only have one dimension, which is a re-scaling of the y-axis values. So Promote button is greyed out.

Not applicable
Author

I have 2 dimensions: i) time and ii) category (paired letters)

In the Expressions tab, all I have is the values (Y-axis) / 1000

antoniotiman
Master III
Master III

In Propery -> Sort You select Order .

Regards

ashwanin
Specialist
Specialist

you need to do the shorting of values of field which you have used in Dimension in script level

here YX should be 1  and then so on .

Reload and then do shorting in the graph.

Not applicable
Author

The Ordering options are Original and Reversed, but I want to order according to a custom sequence. That doesn't seem to be possible from what I can see. Is there a way to enter an expression so that the ordering is as follows:

YX at the top, followed by GY, YY and XG ?

Not applicable
Author

Thanks Ashwani, When you say script level, do you mean I have to order the raw data before loading?

jsingh71
Partner - Specialist
Partner - Specialist

You can add dimension  as a expression in expression tab...after that you'll do pramote and demote.