This custom chart is intedend to be used in https://app.rawgraphs.io/.
This chart is designed for comparing two numerical dimensions across a set of ordered categories.
The most common application is for creating "population pyramids". In a population pyramid, one gender is represented on each side of the chart, with age groups arranged vertically. This allows you to observe the overall distribution of age groups and compare the distributions between males and females.
- Download the latest release from the side panel on this page, or via this link.
- In RAWgraphs interface, load a dataset. You can use this sample.
- In the section
"2. Choose a chart"
scroll down and click on the button"Load your chart"
- Select the
"Load from file"
tab - Drag and drop the downloaded file
- Click on
"Load your chart"
button - A pop-up will inform you that you are loading an external piece of code, click on
"continue"
to load it - You are now ready to use the chart
In this tutorial we'll create population pyramid for Germany in 2019.
In RAWgraphs interface, load the dataset you can find at this link. You can download it and upload in RAWGraphs interface, or load it derecly in RAWGraphs using the from URL
section in the interface.
The dataset contains three columns: the age group, number of male people, and number of female people for that age group.
select "Paired Barchart". If you don't see it, read the section Installation.
Drag and drop the dimensions to the chart variables as it follows:
Male
onLeft side
Female
onRight side
Age
onY Axis
The chart offers some options to customize the chart.
In the Axis panel you'll find all the variables for handling the bottom axes ticks and their appearance.
- In
Vertical label override
put as text "Age group"
In the Chart you can define bars paddings, the internal space, and bars sorting
- Set
Space for common axis
to 80
In the Color panel you can associate one main tint that is then used to color the bars according to their value
- Set the first
Color scheme
to "Red sequential" - Set the second
Color scheme
to "Green sequential"
If you'd like to contribute, follow the RAWGraphs custom template guide.
npm install
Modify the chart on your machine with livereload thanks to Webpack.
npm run sandbox
You can find your charts at http://localhost:9000
Build the chart to use it in RAWGraphs.
npm run build
Original code by @blindguardian50 @steve1711, @TheAlmightySpaceWarrior, @wizardry8 under the supervision of @kandrews99