# How to horizontally flip a bar chart?

Is there a possibility to flip a bar chart? Sounds like a simple thing to do but I can't find it.

• Im not sure if this it what you mean, but under properties you can choose horisontal or vertical bar chart:

• Hi Louise, thanks for the reply but that's not what I mean. I want a (horizontal) bar chart but then 'start' from the right instead of the left.

• Unfortunately I don't think there is a quick fix.

If your dimension on the axis is numeric, you can sort it. Else I think you need to create a user dimension to change the order.

Maybe someone else have better ideas..

• Hi Micha,

I assume that this is what you want to achieve:

As far I know this is not part of the standard solution and it requires some adjustments in the backend of TARGIT. In our case it has been developed and implemented for a POC for a Hebrew speaking customer.

/Steffi

• Here's what I mean.

Regular bar chart:

What I want: horizontally flipped bar chart:

• This is what I was showing you in my example. In my case the y axes is flipped from left to right.

Again, I don't believe it's part of the standard solution as it has been built for our needs. I believe you'll need to reach out to your contact person in TARGIT.

/Steffi

• Hi Micha,

I can achieve something like this:

In the right hand graph, I have taken these steps:

1. Added a calculation (as a new measure): -sum(d1, 0, m1)
2. Used Visibility to hide the original measure.
3. Set Dimension axis properties to 'Axis Line = None' and 'Labels = Do not show'. (Actually did that for both graphs.)
4. Set Labels to {RowMember}: {MeasureValue}
5. Number formatted the Labels: Removed the '-' leading text for negative numbers.
6. Number formatted the measure axis: Removed the '-' leading text for negative numbers.

BR / Ole

• Hi Ole, that is pretty close to what I wanted. I guess I have to settle for that for now.

Thanks a lot!

Or somebody should have the trick to the last steps, get the dimension axis visible to the right (like in Steppi's example) and have the row members labels next to it to the right.

• Hi,

Below examples are possible, however both have their limitations. Option 1 having dimensions from right to left and option 2 having a static amount of dimensions.

Option 1

The above option can be used whether or not the amount of dimensions will change. The downside to this solution is that the dimensions are presented from right to left instead of left to right.

To create this graphic, 3 objects should be created in TARGIT which will be grouped together:

1. Bar chart 1 (for dimensions) ;
2. Bar chart 2 (for measures) ;
3. Shape (vertical line)

Bar chart 1

1. Create bar chart, add dimensions and measures;
2. Go to data and choose ‘reverse sign’
3. Sort values as required;
4. Color bar chart same as used background;
5. Change measure axes; Axis line = None, Labels = Do not show, minimum = 0, maximum = 0;
6. Make the bar chart smaller so that pretty much only the dimensions are left.

Bar chart 2

1. Create bar chart, add dimensions and measures;
2. Go to data and choose ‘reverse sign’
3. Sort values as required (same as in bar chart 1!)
4. Change dimension axis; Axis line = None, Labels = Do not show;
5. Color bar chart as desired;
6. Add labels as desired (make sure to alter presentation of positive/negative values);
7. Create desired width for graphic.

Shape

2. In my example I colored the line using Hex FF909090
3. Outline Width = 1
4. Width of graphic in example = 27

Grouping

1. Make sure that bar char 1, bar chart 2 and shape have the same height;
2. Move them towards each other until you have the desired look;
3. Select them all and group! 😊

Option 2

The above option should only be used if the amount of dimensions will not change. In the above solution the dimensions are presented from the left to right, instead of right to left as in option 1.

To create this graphic, I have created 8 objects in TARGIT which will be grouped together. Create more or less objects as needed.

1. Bar chart 1 (measures)
2. Bar chart 2 (1st dimension)
3. Bar chart 3 (2nd dimension)
4. Bar chart 4 (3rd dimension)
5. Bar chart 5 (4th dimension)
6. Bar chart 6 (5th dimension)
7. Bar chart 7 (6th dimension)
8. Shape

Bar chart 1

1. Create bar chart, add dimensions and measures;
2. Go to data and choose ‘reverse sign’
3. Sort values as required. Keep in mind that the sorting that is chosen, effects the upcoming bar charts and their visibility agents.
4. Change dimension axis; Axis line = None, Labels = Do not show;
5. Color bar chart as desired;
6. Add labels as desired (make sure to alter presentation of positive/negative values);
7. Create desired width for graphic.

Bar chart 2

1. Create bar chart, add dimensions and measures;
3. Add visibility agent; choose hide members and select measure value. Use syntax (sum(c1, 0, m1, 0) > 1 or sum(c1, 0, m1, 0) < 1) to hide all dimensions except dimension with rank 1.
4. Color bar chart same as background;
5. Change measure axes; Axis line = None, Labels = Do not show, minimum = 0, maximum = 0;
6. Make the bar chart smaller so that pretty much only the dimensions are left.

Bar chart 3

1. Repeat steps from ‘Bar chart 2’. Edit syntax used in visibility agent to (sum(c1, 0, m1, 0) > 2 or sum(c1, 0, m1, 0) < 2)

Bar chart 3

1. Repeat steps from ‘Bar chart 2’. Edit syntax used in visibility agent to (sum(c1, 0, m1, 0) > 3 or sum(c1, 0, m1, 0) < 3)

Bar chart 4

1. Repeat steps from ‘Bar chart 2’. Edit syntax used in visibility agent to (sum(c1, 0, m1, 0) > 4 or sum(c1, 0, m1, 0) < 4)

Bar chart 5

1. Repeat steps from ‘Bar chart 2’. Edit syntax used in visibility agent to (sum(c1, 0, m1, 0) > 5 or sum(c1, 0, m1, 0) < 5)

Bar chart 6

1. Repeat steps from ‘Bar chart 2’. Edit syntax used in visibility agent to (sum(c1, 0, m1, 0) > 6 or sum(c1, 0, m1, 0) < 6)

Shape

2. In my example I colored the line using Hex FF909090
3. Outline Width = 1
4. Width of graphic in example = 27

Grouping

1. Make sure that all bar charts and shape have the same height;
2. Move them towards each other until you have the desired look;
3. Select them all and group! Now all the dimensions are presented from left to right and will change accordingly to their rank 😊

Best regards,
Jelle

• Thanks Jelle for these additional 2 possibilities. Maybe in the future TARGIT will just add a 'flip horizontal' button to the bar chart function ;)

• Hi all, maybe in a future TARGIT version it could be possible to change the dimension axis from left to right. For the measure it is already possible, so maybe this could be the location to implement: