TableNG: Footer enhancements (#102948)
* Table: Footer support for multiple reducers * fix migrator test output due to required default value * fix go migration test * more go test fixes * fix go tests for footer * Merge #110062 * update migration dashboard * Small docs fixes * Small docs fix * remove migration method in Go, update js unit test * add migration dashboard for footer and clean up some issues with countAll * Footer should always use og rows for calcs * update footer to be unaffected by filtering and sorting * more e2es * add more complex footer to kitchen sink, migrate panel all the way up * update codeowners for e2e * relocate footer migration panels and e2es to main 12.2 migration dashboard * go further with the migration; kill unused fields, rename reducer to reducers * get the go code up to date, move enablePagination to its own option as well * add a unit to one of the numeric columns with a footer in kitchen sink * fix reducers override in kitchen sink migration table --------- Co-authored-by: Paul Marbach <paul.marbach@grafana.com> Co-authored-by: Isabel Matwawana <isabel.matwawana@grafana.com> Co-authored-by: Isabel Matwawana <76437239+imatwawana@users.noreply.github.com> Co-authored-by: Leon Sorokin <leeoniya@gmail.com>
This commit is contained in:
co-authored by
Paul Marbach
Isabel Matwawana
Isabel Matwawana
Leon Sorokin
parent
ae97eb860c
commit
6c9faa7595
@@ -216,14 +216,35 @@ This option is only available when you're editing the panel.
|
||||
|
||||
### Table footer options
|
||||
|
||||
Toggle the **Show table footer** switch on and off to control the display of the footer.
|
||||
When the toggle is switched on, you can use the table footer to show [calculations](ref:calculations) on fields.
|
||||
The table footer displays the results of calculations (and reducer functions) on fields.
|
||||
The footer is only displayed after you select an option in the **Calculation** drop-down list:
|
||||
|
||||
After you activate the table footer, make selections for the following options:
|
||||
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-table-footer-selector-v12.2.png" max-width="300px" alt="" >}}
|
||||
|
||||
- **Calculation** - The calculation that you want to apply.
|
||||
- **Count rows** - This option is displayed if you select the **Count** calculation. If you want to show the number of rows in the dataset instead of the number of values in the selected fields, toggle on the **Count rows** switch.
|
||||
- **Fields** - The fields to which you want to apply the calculation. Grafana applies the calculation to all numeric fields if you don't select a field.
|
||||
There are several calculations you can choose from including minimum, maximum, first, last, and total.
|
||||
For the full list of options, refer to [Calculations](ref:calculations).
|
||||
|
||||
In the table footer:
|
||||
|
||||
- You can apply multiple calculations at once.
|
||||
- All calculations and reducer functions are labeled except **Total** when it's the only function applied.
|
||||
- The calculations and reducer functions apply to all fields in the table, by default. To control which fields have a calculation or function applied, add the table footer in an override instead.
|
||||
- If you enable a mathematical function for a non-numeric field, nothing for that function is displayed for that field.
|
||||
|
||||
In the following image, multiple calculations—**Mean**, **Max**, and **Last**—have been applied:
|
||||
|
||||
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-table-footer-1-v12.2.png" max-width="750px" alt="" >}}
|
||||
|
||||
You can also see in the previous image that the mathematical functions, **Mean** and **Max**, haven't been applied to the text field in the table.
|
||||
Only the **Last** function has been applied to that field.
|
||||
|
||||
In the following image, the **Total** calculation has been applied, and no label is displayed because it's the only function:
|
||||
|
||||
{{< figure src="/media/docs/grafana/panels-visualizations/screenshot-table-footer-2-v12.2.png" max-width="750px" alt="" >}}
|
||||
|
||||
{{< admonition type="note">}}
|
||||
Calculations applied to cell types like **Markdown + HTML** might have unexpected results.
|
||||
{{< /admonition>}}
|
||||
|
||||
### Cell options
|
||||
|
||||
|
||||
Reference in New Issue
Block a user