Add pictures to a chart axis
This picture below shows you a column chart with pictures (flags) below each column.
Watch this video to learn how to build above chart or follow the instructions below.
Instructions
- Select a data range
- Click "Insert" tab on the ribbon and click "Column" and then "Clustered column"
- Right click on the second series and click on "Change Series Chart Type...". Change it to x y (scatter) and click "Scatter with only markers".
- Remove axis and legend
- Right click on x axis and click on "Format Axis..."
- Change label distance to 500
- Click a x y scatter data point
- Paste a picture. I resized the picture to 25 px width first.
- Repeat step 7 and 8 with the remaining pictures.
Other uses
You can use the same technique with a bar chart.
Other interesting chart techniques
- An animated bar chart
- Highlight a group of chart bars
- Format fill color on a column chart based on cell color
- Use drop down lists to compare data series in an excel chart
- Highlight a data series in a line chart
- Use a map in an excel chart
- Custom data labels in a chart
Download excel *.xlsx file
Question: How do I create a chart that dynamically adds the values, as i type them on the worksheet? Answer: […]
How to use mouse hover on a worksheet [VBA]
I recently discovered an interesting technique about using a user defined function in a HYPERLINK function. Jordan at the Option […]
Change chart data range using a Drop Down List [VBA]
In this article I will demonstrate how to quickly change chart data range utilizing a combobox (drop-down list). The above […]
Color chart columns based on cell color
This article demonstrates macros that automatically changes the chart bar colors based on the corresponding cell, the first example is […]
How to create an interactive Excel chart [VBA]
This article describes how to create an interactive chart, the user may click on a button or multiple buttons and […]
Improve your X Y Scatter Chart with custom data labels
The picture above shows a chart that has custom data labels, they are linked to specific cell values. What's on […]
How to build an interactive map in Excel
This article describes how to create a map in Excel, the map is an x y scatter chart with an […]
Highlight group of values in an x y scatter chart programmatically
I will in this article demonstrate how to highlight a group of values plotted in an x y scatter chart […]
How to add horizontal line to chart
This tutorial shows you how to add a horizontal/vertical line to a chart. Excel allows you to combine two types of […]
7 Responses to “Add pictures to a chart axis”
Leave a Reply
How to comment
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.
Great technique and one I have not seen before.
For those that may not know, you can add a custom number format to the axis to remove the negative numbers if you don't need them. Just right-click and format the axis. Then from number choose custom, and enter the positive number format, a semicolon, keep it blank for the negative numbers, a semicolon, and then the format that you want for zero (you can use a blank here if you want to remove the zero too) For example, I would use 0;;0 for this chart.
Darin Myers,
great comment!
Thanks for a great idea. I'll use it.
//Ola
Made one small improvement:
To auto-adjust the flag position when the maximum value change.
D3toD7: =MAX($C$3:$C$7)*(-1,5/22) -- chart size constant
and change...Format Axis, Bounds, Minimum to Auto
Ola,
thank you for your formula, it works fine.
Helo.
I find your comment interesting, but dont know where to type formula? And also i dont know why we dont just select the chrat and then inser the picture. It automaticly inserts picture into chart area. Then all you have to do is resize the picture manually.
Sorry for possible bad english.
Bye
How do I use the same technique with a horizontal bar chart? When I lay ou tthe scatter points, they all lie on the same horizontally. If I try it vertically, they are not spaced in line with the bars. Thanks for this great guide!
Albert
How do I use the same technique with a horizontal bar chart?
A horizontal bar chart is a clustered column chart?
If I try it vertically, they are not spaced in line with the bars.
Look at step 4 above. Remove the second axis and both data series use the same axis. They will be spaced in line with the bars.
Hope that helps.