Table of Contents
What is a Butterfly Chart
Butterfly Charts or Population Pyramid Charts are a special kind of Stacked Bars, usually with just two series whose bars go on different directions from the middle axis. This type of chart is used for similar or analogue entities, such as men and women, good and bad, before and after.
The Butterfly Chart usually shows horizontal bars, but it can be switched for vertical columns as well. When visible, the staggered axis labels look like dividing the whole chart in the middle. Each series uses a different axis.
Steps to Create a Butterfly Chart
Start Visual Xtractor or Data Xtractor. Connect to a database. Create or design a SQL query. Run the query and check the results.
- Display and enable the Chart query builder.
- Select one numeric column as Stacked Charts – Stacked Bar.
- Select another similar numeric column as Stacked Charts – Butterfly Bar.
- Select an eventual Label, for legend items.
Butterfly Chart Demo Query
Look for the ready-to-use Butterfly Chart generated chart query under the Queries > Demo Queries > Charts > Stacked Charts folder. Click on the “add demo queries” command link, to make sure it’s there.
Emulated Population Pyramid Chart
A somehow similar chart may be achieved with two Stacked Bar series, one of them displayed with negative values. However, this would not split the chart in the middle with the axis labels, the way we do here. And it will show the second series’ numeric labels with negative values, which may be unnatural.
Emulated Population Pyramid demo query does exactly that.
Customize your Butterfly Chart
- Show both series with the same color, or even turn all colors off.
- Switch from horizontal bars to vertical columns.
- Show data labels inside.
- Hide the numeric axis labels.
- Creating Butterfly Charts in Data Xtractor or Visual Xtractor is fast and easy: set one numeric column as Stacked Bar, and the one going into opposite direction as Butterfly Bar, with one optional Label.
- Switch from the default horizontal bars to vertical columns.
- All builtin powerful features of these chart type are common to most other charts: filtering series through the legend items, interactivity, monochrome or grayscale colors, rich axis and data label selections etc.
- Switch to another builtin chart theme, or customize your own, for any possible color or other styles.