Skip to main content

Crash Query - Chart Builder Overview

How to use Chart Builder in Crash Query

Written by Greg Olsen

Chart Builder lets you make your own charts from the crashes in your query, such as crashes by year or severity by time of day. Charts are saved with the query. You can download them or add them to a Crash Summary or Over-representation report.

Each chart uses one measure. Crash (Cost) uses your agency's default KABCO crash costs to total the cost of the crashes in each group. Crash (Count), Person (Count), and Vehicle (Count) count the crashes, people, or vehicles in each group.

Crash Query with saved charts in the Chart Builder tab

(Saved charts in the Chart Builder tab)

Create a Chart

1. Click the Chart Builder tab (1), and then click the + icon in the top-right corner (2).

Chart Builder tab and plus icon numbered 1 and 2

(1 - Chart Builder tab, 2 - plus icon)

2. Work through the three steps on the left:

Chart Type, Measure, and Grouping steps for a new chart

(The three steps for a new chart)

  • Chart Type: Bar, Stacked Bar, Grouped Bar, Line, Pie, or Pivot Table.

  • Measure (vertical axis): What to total, such as Crash (Count) or Crash (Cost).

  • Grouping (horizontal axis): How to split the totals, such as Crash Date & Time (Year). Stacked Bar and Grouped Bar also have a second grouping for Sub-groups, such as Crash Injury Severity.

Chart Type menu listing the six chart types

(The Chart Type menu)

3. Click Untitled Chart in the top-left corner and type a name.

4. Adjust the options in the Chart Builder Sidebar on the right if you need to.

5. Click Save.

Finished stacked bar chart in Chart Builder with its options marked

(A stacked bar chart of crashes by year and severity, with the chart name, steps, options, Download, and Save marked)

Chart Types

The following chart types are available in Chart Builder:

Bar

Shows one measure and one grouping as vertical bars. Downloads as a PNG image.

Example bar chart in Chart Builder

(A bar chart)

Stacked Bar

Shows one measure and two groupings as stacked vertical bars. Downloads as a PNG image.

Example stacked bar chart in Chart Builder

(A stacked bar chart)

Grouped Bar

Shows one measure and two groupings as vertical bars side by side in groups. Downloads as a PNG image.

Example grouped bar chart in Chart Builder

(A grouped bar chart)

Line

Shows one measure and one grouping as a line chart. Downloads as a PNG image.

Example line chart in Chart Builder

(A line chart)

Pie

Shows one measure and one grouping as a pie chart. Downloads as a PNG image.

Example pie chart in Chart Builder

(A pie chart)

Pivot Table

Shows one measure with up to three groupings. Downloads as a CSV file.

  • The first grouping sets the rows, the second sets the columns, and the third adds a second level of rows. Click + Add Grouping to add each one.

  • A pivot table can have up to 1,000 rows.

  • Under Display in the Chart Builder Sidebar, select Show as percent to show each value as a percentage of the total.

  • Pivot tables can't be added to Crash Summary reports.

Show as percent checkbox selected under Display in the Chart Builder Sidebar

(A pivot table with Show as percent selected)

Saved pivot table card in the Chart Builder tab

(A pivot table saved in the Chart Builder tab)

Downloaded pivot table CSV opened in a spreadsheet

(A downloaded pivot table CSV)

Chart Builder Sidebar

The Sidebar on the right holds the formatting options for each chart. The options change with the chart type.

Sorting

Available for Bar, Stacked Bar, Grouped Bar, Line, and Pie.

  • Order: Ascending or Descending.

  • Sort by: Measure (the totals) or Grouping (the labels).

  • # of values: How many top values to show: up to 25, or up to 15 for pie charts.

  • Enable "Other" slice (Pie only): Combines the values that aren't shown into one slice.

Sorting options in the Chart Builder Sidebar

(The Sorting options)

💡 Tip: To show years or months in order, set Sort by to Grouping.

Vertical and Horizontal Axis

Available for Bar, Stacked Bar, Grouped Bar, and Line. Add a title to either axis; it appears outside the axis. Select Show tick Labels to show value labels along the axis. Click the gear next to the checkbox to add a prefix or suffix (such as $ or %), or to change the number format or date and time format.

Vertical and horizontal axis options in the Chart Builder Sidebar

(The axis options)

Legend

Available for Stacked Bar, Grouped Bar, and Pie. Select whether the legend appears at the bottom or on the left.

Legend options in the Chart Builder Sidebar

(The Legend options)

Totals

Available for Pivot Table. Show or hide a Total row and a Total column, which add up each column and row.

Totals options for a pivot table in the Chart Builder Sidebar

(The Totals options)

Work With Saved Charts

Saved charts appear as cards in the Chart Builder tab. Hover over a bar or slice to see its values. Hover over the card's title bar to see these buttons:

Preview, Edit, Download, and Delete buttons on a saved chart card

(The buttons on a saved chart's title bar)

  • Preview: Opens a larger view of the chart.

  • Edit: Reopens the chart so you can change it.

  • Download: Downloads the chart.

  • Delete: Removes the chart.

To rename a saved chart, click its name on the card, type a new name, and press Enter.

Chart name field being edited on a saved chart card

(Renaming a saved chart on its card)

To put your charts in a Crash Summary Report, create a Summary report and select Include Charts Below Metrics.

Did this answer your question?