Data visualization
Bar charts
Use bar or column charts to show comparisons of different discrete items, factors or categories. Comparisons could include items that can be counted and categorized. These are some of the easiest charts to interpret because the data is shown by length of bar.
Types
Simple bar chart
Jinja code snippet
* [_includes/organisms/chart.html](https://github.com/cfpb/consumerfinance.gov/blob/main/cfgov/jinja2/v1/_includes/organisms/chart.html)
* [_includes/organisms/mortgage-chart.html](https://github.com/cfpb/consumerfinance.gov/blob/main/cfgov/jinja2/v1/_includes/organisms/mortgage-chart.html)
* [_includes/organisms/mortgage-map.html](https://github.com/cfpb/consumerfinance.gov/blob/main/cfgov/jinja2/v1/_includes/organisms/mortgage-map.html)
Grouped bar chart
Categories bar chart
Stacked bar chart
Guidelines
- If exact numbers are important, the bars should be labeled with the value.
- When possible label directly rather than relying on color.
- For stacked charts, use a white line or stroke to create contrast between bar chunks.
- For color guidance, view Data visualization palettes on the Color page.