Skip To Content

Create and use a bar chart

A bar chart is created by displaying a string field on the y-axis and a count, number field, or rate/ratio field on the x-axis. The length of each bar represents the value of each category.

Bar charts can answer questions about your data, such as: How are numeric values distributed or summarized by category? How is your data ranked?

Examples

An insurance company is reviewing the types of policies it offers to compare to the findings from a recently completed market research project. The first step in the review is to determine the total value of policies in each policy class. A bar chart can be used to visualize the sum of total insured values (TIV) for each policy class.

Bar chart showing TIV by Policy_Class

The bar chart above provides a sum of the TIV for each category of insurance policy: Disability, Automobile, Life, and Property. When the chart is sorted in ascending order, it's easy to see the highest and lowest values.

The insurance company is especially interested in expanding its business in five cities of interest. The Subgroup field can be used to compare the TIV for each policy class across cities.

Grouped bar chart showing total insured value by policy class for cities of interest

The grouped bar chart above shows the distribution of subgroups for each category. The Policy_Class values (Property, Life, Disability, and Automobile) have subgroups that show a different colored bar for each city that's included in the card filter.

Create a bar chart

To create a bar chart, complete the following steps:

  1. Select one of the following data options:
    • One or two string fields String field
    • One or two string fields String field plus a number Number field or rate/ratio field Rate/ratio field
    Note:

    If you do not select a number or rate/ratio field, your data will be aggregated and a count will be displayed.

  2. Create the bar chart using the following steps:
    1. Drag the selected fields to a new card.
    2. Hover over the Chart drop zone.
    3. Drop the selected fields on Bar Chart.
Tip:

You can also create charts using the Chart menu above the data pane or the Visualization type button Visualization type on an existing card. For the Chart menu, only charts that are compatible with your data selection will be enabled. For the Visualization type menu, only compatible visualizations (including maps, charts, or tables) will be displayed.

Usage notes

The Legend button Legend can be used to change the Symbol Type to Single symbol or Unique symbols. The Chart Color can be changed if the Symbol Type is single symbol. If unique symbols are used, the Legend can be used to select data on the bar chart. To change the color associated with a category, click the symbol and choose a color from the palette or enter a hex value.

The value of each bar can be symbolized as a count of features in each category on the y-axis, or as a number or rate/ratio field. If a field is used, the bar values can be calculated as a sum, minimum, maximum, or average of values from the field for each category.

An optional Subgroup field can be selected on the y-axis. The Subgroup field must be a string field and will be used to divide each category on the y-axis into subcategories. You can also switch from a grouped bar chart to a stacked bar chart using the Stack chart button Stack chart.

Tip:

Style related maps with the same field you used to group your bar chart. When you interact with the chart or map, you'll be able to see simultaneous categorical and spatial patterns.

Use the Chart statistics button Chart statistics to display the mean, median, upper quartile, lower quartile, or a custom value.

Use the Sort button Sort to sort the categorical data either ascending or descending by the numeric variable, or alphabetically.

Use the Visualization type button Visualization type to switch directly between a bar chart and other visualizations, such as a unique values map, summary table, bubble chart, or line graph.

When you create a bar chart, a result dataset Results with the string and number fields used to create the chart will be added to the data pane. The result dataset can be used to find answers with nonspatial analysis using the Action button Action.