Change axis X labels to the exact values of the data

Rainmanne

Board Regular
Joined
Mar 10, 2016
Messages
134
Office Version
  1. 2019
Platform
  1. Windows
I was trying to find a solution but could not. I have a table, which I need to represent as a horizontal bar chart:

1st row: Y-axis labels
2nd row: data (length of each bar chart)
3rd row: labels at the end of each bar chart.
It's easy to do but I also need that the labels on the X-axis reflected the data in row 2. So the numbers in row 2 are
35 108 125 140 151 215 270

and I need the labels on the X-axis to be the same. Currently they are 50, 100, 150, 200, 250 and 300. Is it possible to achieve?
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
In almost any other chart type it would be much easier. adding second series of y = 0 0 0 ... (then adding X 35 108 125 ...) and graphing it as scatterplot (XY) with markers only (+ as marker, labels, changing labels source to X and location to bottom) and finally removing original x axis labels.

But horizontal bars are different - their value axis is horizontal and labels axis is vertical, so after such operation on vertical axis you will also have these numbers not Y axis labels.

To the merit:

Probably the easiest (but not most elegant) way will be by preparing somewhere else (may be hidden sheet) the same size scatterplot with labels as said above and use a camera tool in Excel.
Short intro to this tool (if you never used it) could be for instance:

Screenshot with example steps:
1733901735442.png


and the result (probably still some details in formatting/positioning would be needed :))

1733901836390.png


Final comment - are still using Excel 2013? If not please update your profile
 
Upvote 0
In almost any other chart type it would be much easier. adding second series of y = 0 0 0 ... (then adding X 35 108 125 ...) and graphing it as scatterplot (XY) with markers only (+ as marker, labels, changing labels source to X and location to bottom) and finally removing original x axis labels.

But horizontal bars are different - their value axis is horizontal and labels axis is vertical, so after such operation on vertical axis you will also have these numbers not Y axis labels.

To the merit:

Probably the easiest (but not most elegant) way will be by preparing somewhere else (may be hidden sheet) the same size scatterplot with labels as said above and use a camera tool in Excel.
Short intro to this tool (if you never used it) could be for instance:

Screenshot with example steps:
View attachment 120265

and the result (probably still some details in formatting/positioning would be needed :))

View attachment 120266

Final comment - are still using Excel 2013? If not please update your profile
Thanks a lot. I have ended up combining two series in the chart not by using the camera tool but just adding a xy scatter series as you suggested to the vertical bar chart and adjusting all the labels and ticks. So I've got the exactly same result as you did with the camera tool.
 
Upvote 0
Glad to hear so, and thanks for updating your profile. It helps us to help effectively :-D
 
Upvote 0

Forum statistics

Threads
1,225,619
Messages
6,186,049
Members
453,335
Latest member
sfd039

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top