Bar Charts
Summary of Content
Plot a Bar Chart
Required Fields
Marks
Bar Orientation
Stacked Bar Variations
Format Options
Conditional Formatting
Add a New Rule
Rule Prioritization
Example
Related Resources
Plot a Bar Chart
Visualizations can be created via the PAGE ELEMENTS section of your workbook's editor panel or directly from an existing data element.
Visualized data will not display on the page canvas until all required plot fields are defined.
Add columns to open fields using either the field's + menu or dragging and dropping the column.
Required Fields
- X-AXIS (1 column)
- Y-AXIS (1+ columns)
Columns added to the Y-AXIS field are aggregated by default. Aggregation type (e.g. Sum vs Count) is dependent on the original column’s value type (e.g. text, number, date, etc).
Example: A numeric column [Line Item Total] will aggregate to [Sum of Line Item Total].
Marks
- COLOR (1)
- TOOLTIP (1+)
- TRELLIS (1 TRELLIS ROW and/or 1 TRELLIS COLUMN)
Bar Orientation (Horizontal vs Vertical)
Bar charts can be displayed both vertically and horizontally.
Switch Bar Orientation
Before you start: This action uses the editor panel. If you have not done so already, open the editor panel from either Explore or Edit mode. Learn more
- In the editor panel's VISUALIZATION section, below the visualization type, click either the display vertical button or display horizontal button.
Stacked Bar Variations
Bar charts support three stack variations: no stacking, stacked, and stacked 100%.
Stack Bars
Before you start: This action uses the editor panel. If you have not done so already, open the editor panel from either Explore or Edit mode. Learn more
- In the editor panel, add a column to the COLOR field.
- In the panel's VISUALIZATION section, below the visualization type, select any of the three stack options by clicking its icon button.
Format Options
To begin editing an visualization’s format options:
Before you start: This action uses the editor panel. If you have not done so already, open the editor panel from either Explore or Edit mode. Learn more
- In the editor panel, click the paintbrush (
) button.
- Select a format option to view and edit its settings.
The following format categories are available for bar charts:
- Background
- Title
- X-Axis
- X-Axis
- Legend
- Data Labels
- Gaps
- Reference Lines
Conditional Formatting
Add a New Rule
Before you start: This action uses the editor panel. If you have not done so already, open the editor panel from either Explore or Edit mode. Learn more
- In the editor panel under MARKS > COLOR, click + Add rule.
- A new undefined rule will appear.
Click it. - In the popup:
- Select a column to apply the rule to (Apply to).
- Define your Formatting rule.
- Click the paint bucket icon to select a color.
Rule Prioritization
If multiple rules are applied to a single column, you may need to order your rules by precedence. Rules higher in the list take precedence over their lower peers.
Drag and drop rules to reorder them.
Example
In the example below, Rule #1 colors all bars with a value > 1,000,000 green. Rule #2 colors all bars with a value > 0 purple. Rule #1 applies to only a select set of bars in the visualization. However, Rule #2 applies to all bars.
Scenario #1: If Rule #1 is listed first, it will take precedence over Rule #2. All bars that fit the criteria of Rule #1 will be colored green. Rule #2 cannot override this higher rule and will only checked against and applied to the remaining bars.
Scenario #2: If Rule #2 is listed first, it will take precedence over Rule #1. In this case, Rule #2 happens to apply to every bar. All bars will be colored purple, including bars that would have otherwise matched Rule #1.
Related Resources
Intro to Building Visualizations