Charting averages, totals and counts by field
Besides counting entries, a chart can show the total, average, highest or lowest value of one field for each choice of another, such as average revenue per region or total sales per reporting year.
Fields the form needs #
The chart needs these fields on the form:
- A choice-based field to group by, such as a Drop Down, Radio Buttons or Checkboxes. Each choice becomes a bar or a slice.
- A field holding the numbers: a Number field, a choice field whose choice values are numbers, or a product field such as a price or the Total. Supported field types lists them all.
Note: The field you group by has to offer choices. To group by year, store the year in a Drop Down with one choice per year.
Set up the chart #
- Go to Forms, hover over the form, hover over Settings and click GravityCharts, then click Add New.
- Name the chart and pick a chart type. Bar / Column suits most comparisons.
- Leave Data Type on By Field (Default).
- Set Data Source to the field you want to group by.
- Set Data Operation to the calculation you want.
- Set Data Field to the field holding the numbers.

The available operations #
| Operation | Shows |
|---|---|
| Entry count | How many entries fall into each choice. No Data Field needed. |
| Sum values | The total of the Data Field for each choice. |
| Average values | The mean of the Data Field for each choice. |
| Maximum value | The highest single value in each choice. |
| Minimum value | The lowest single value in each choice. |
Example: average revenue per year #
With a Reporting Year Drop Down as the Data Source and a Revenue Number field as the Data Field, Average values draws one bar per year with that year’s average revenue.

Charting only some entries #
Under Conditional Logic, click Add Condition to chart only the entries that match, such as one region or one status, without a separate form. The preview follows the conditions as you add them.
In a View, the GravityCharts widget charts the View’s entries, so a visitor’s search narrows the chart too. You choose All View entries or Entries shown on the page in the widget’s Display Data For setting.
Charting a trend over time #
To show a trend over time, set Data Type to Show on Timeline, which puts a Date field or the entry date on the X axis. See Plotting data against time.