Server-Side Row Model - Pivoting
Summary
- Pivoting is available in AdapTable when using the Server-Side Row Model
- The data needs to be pivoted on the server and passed to the client to display
- Pivot result columns are created dynamically from the server response
AdapTable fully supports Pivoting when using the Server Side Row Model.
Nothing additional needs to be added, on the AdapTable side, to that which is provided in AG Grid's Server-Side architecture.
Note
After each getRows response you typically build AG Grid pivot result columns from the fields the server returns (see pivotResultColumns.ts in the demo).
SSRM - Pivoting
- Uses the public athletes mock server (
data.adaptable.dev) to pivot on the server and return rows +pivotFields - Switch Layouts in the Dashboard toolbar to compare patterns:
- Year Pivot — group by
Country, pivot onYear, sumGold(dynamic year columns) - Multi-Value Pivot — same pivot with
Gold/Silver/Bronzeunder each year group - Multi-Group Pivot — group by
CountrythenSport, pivot onYear(expand a country to drill down) - Agg-Only Pivot — Pivot Sum style: group by
Country, sum medals, noPivotColumns(empty array)
- Year Pivot — group by
- Pivot result columns are rebuilt whenever the server returns a new
pivotFieldsset
Loading demo…