Showing posts with label overlapping bars. Show all posts
September 13, 2016
Tableau Tip Tuesday: How to Create a Combination Chart with Overlapping Bars & a Line
combination chart
,
combined axis
,
dual axis
,
line chart
,
overlapping bars
,
Tableau Tip Tuesday
4 comments
In this week’s tip, I look back at one of my most popular posts - 7 easy steps to create a combination chart with overlapping bars & a line. The tip hasn’t changed much, however, this time there’s a video.
July 17, 2015
Dear Data Two | Week 9: Jeff & Andy
Still playing catch up on Dear Data Two. The topic for week 9 was Jeff & Andy. Wow...talk about a topic with unlimited possibilities! Immediately I thought about looking at the connections that we have in common across the major social networks.
I manually created a spreadsheet of our total connections each and our connections in common. I then created random points on a graph in order to display them as a hub & spoke diagram. I referred back to my own blog post for help in shaping the data correctly. This was a bit trickier, though, as I wanted to show Jeff on the left, our common connections in the middle, and my connections on the right. You can download the Excel spreadsheet here.
Some explanations about the viz:
I manually created a spreadsheet of our total connections each and our connections in common. I then created random points on a graph in order to display them as a hub & spoke diagram. I referred back to my own blog post for help in shaping the data correctly. This was a bit trickier, though, as I wanted to show Jeff on the left, our common connections in the middle, and my connections on the right. You can download the Excel spreadsheet here.
Some explanations about the viz:
- You can click on any combination of things in the bar chart to update the network diagrams.
- LinkedIn only shows me when we hit 500 connections, so I totally made up the total connections.
- I chose blue for me because it's my favorite colour and red for Jeffrey because he lives in Cincinnati and that's the home of the Reds.
February 24, 2015
Tableau Tip Tuesday: Creating Bar in Bar Charts
This week's Tableau Tip Tuesday shows you how to create charts with a bar inside of another bar. These are very useful for making comparisons between either two measures (e.g., budget vs. actuals) or two discrete dimensions (e.g., central vs. east).
August 26, 2011
Tableau: Dual axis chart with overlapping bars and a line
What took me a couple hours to figure out in Excel (see previous blog post) just took me about 90 seconds to create in Tableau (though I do have 4+ years experience with Tableau).
Notice that the bars are properly scaled now too. The gray bar now longer is at $150 not $190 like it looked like in Excel. Bottom line, use Tableau.
Notice that the bars are properly scaled now too. The gray bar now longer is at $150 not $190 like it looked like in Excel. Bottom line, use Tableau.
Excel: How to create a dual axis chart with overlapping bars and a line
I came across a challenge last week while working on a project. I needed to create a dual-axis chart, with two bars on the primary axis and a line on the secondary axis. Tableau makes this task incredibly easy, but I needed to do this in Excel. Well, I really didn’t HAVE to create the chart in Excel, but others needed to be able to update the chart and they, gasp, don’t have a Tableau license.
It’s easy enough to create a dual-axis chart in Excel, if you want the bars side by side. However, I needed overlapping bars. There’s no standard chart design within Excel to accommodate this, which meant I had to come up with a workaround. I perused the internet and didn’t find anyone else that had done this (I’m sure people have done it, but haven’t shared their work), so I wanted to share it with anyone that may need to do it in the future.
A sample Excel workbook can be found here (if your corporate network blocks Dropbox, send me an email and I’ll forward it to you).
The final product looks like this:
I would go with option 3 because the naked eye won’t be able to discern the difference to the bar height anyway. The purpose of the chart, after all, is to give the overall trends and comparisons anyway, not focus on the original data.
If that “change” in the bar size really bothers you, then simply add the data table under the chart:
Don’t we all love challenges! I know I do.
It’s easy enough to create a dual-axis chart in Excel, if you want the bars side by side. However, I needed overlapping bars. There’s no standard chart design within Excel to accommodate this, which meant I had to come up with a workaround. I perused the internet and didn’t find anyone else that had done this (I’m sure people have done it, but haven’t shared their work), so I wanted to share it with anyone that may need to do it in the future.
A sample Excel workbook can be found here (if your corporate network blocks Dropbox, send me an email and I’ll forward it to you).
The final product looks like this:
Steps to reproduce:
- Highlight your data, insert a 2-D clustered column chart
- Change the bar and line colors if desired
- Right-click on one of the bars that you want on the secondary axis and choose Format Data Series
- Change the Plot Series On option to Secondary Axis
- With the bars on the secondary axis still highlighted, from the Chart Tools Design menu, change the Chart Type to a line
- Right-click on one of the bars that are on the primary axis and choose Format Data Series
- Change the Series Overlap to 100%
- The two bars on the primary axis now completely overlap each other. You’re almost done!
- Remove the gridlines (important…I’ll explain in a bit) and add the axis labels (I hate it when people create dual-axis charts in Excel and don’t add the axis labels!)
- Give the bars the “overlap” look (these are the most important steps to give the bars the proper) by right-clicking on the gray bar (i.e., the bar that’s in the first column of the table) and choosing Format Data Series
- Choose the Border Color option, select Solid Line and set the color to the same color as the bar (in my case, light gray)
- Choose the Border Styles option, change the Width to 10pt (or whatever floats your boat) and change the Cap type to Flat and the Join type to Miter
- That’s it! You’ve create a dual-axis chart in Excel with overlapping bars on the primary axis and a line on the secondary axis.
- Make the border of the bar in the back really thin, but this makes it challenging to see the overlap
- Change the data to account for the thickness, but it’s kinda scary to me to alter the data because if you mouse over the point you see the original data
- Leave the bars thick so that you can clearly see the overlap
I would go with option 3 because the naked eye won’t be able to discern the difference to the bar height anyway. The purpose of the chart, after all, is to give the overall trends and comparisons anyway, not focus on the original data.
If that “change” in the bar size really bothers you, then simply add the data table under the chart:
Don’t we all love challenges! I know I do.
Subscribe to:
Posts
(
Atom
)