Spotfire® User Guide

Bar chart

In a bar chart, you can compare values for different categories in your data (continuous data can be made categorical by auto-binning).

There are two types of axes in the bar chart, a Category axis and a Value axis. In most cases, columns containing numerical data are selected on the Value axis, and columns with categories are selected on the Category axis.


example of a bar chart

The bar chart shows data using a number of bars, each representing a particular category. The height of each bar is proportional to a specific aggregation (for example, the sum of the values in the category it represents). The categories could be something like an age group or a geographical location. It is also possible to color or split each bar into another categorical column in the data, which lets you to see the contribution from different categories to each bar or group of bars in the bar chart.

You can adjust the scales and scale labels, as well as other axis settings, from the visualization properties for each axis, and you can add features such as gridlines, zoom sliders or error bars, and so on.

Example

The bar chart below shows the total sum of sales for fruits and vegetables over three years.

The bars are colored by the Category column, which contains two values: Fruit and Vegetables. You can also view these color categories side-by-side as in the bar chart below. Locate the layout section in the visualization properties and click the Side-by-side option.
Tip: In the installed client, you can also right-click in the visualization and select Side-by-Side Bars from the pop-up menu directly.

Another way to get a similar appearance is to add the column Category to the category axis to create a hierarchy on that axis. See Hierarchies to learn more about multiple columns on an axis.

If you prefer the bars to be shown horizontally, locate the bar orientation section in the visualization properties (under Appearance) and click the Horizontal option.

Tip: You can also right-click in the visualization and change the orientation of the bars from the pop-up menu directly.

Note that in some cases the category axis is referred to as X-axis, and the value axis is referred to as Y-axis. This is the case when adding some lines and curves, for example, as well as in OVER statements in custom expressions.

All visualizations can be configured to show data limited by one or more markings in other visualizations only (details visualizations). Bar charts can also be limited by one or more filterings. Another alternative is to configure a bar chart without any filtering at all. See Adding data limitations for a visualization for more information.

Tip:

When applying filtering to a bar chart, you can use the property Indication of unfiltered data (sometimes also called Show shadows indicating unfiltered data) to show a gray shadow behind all visible bars, indicating the height of the bar as if all filters are reset and all data is available.

You can show data from multiple data tables in the same visualization if a proper data table matching is available. For more information, see Multiple data tables in one visualization and Column matches.