Documentation

Pivot Mode

Pivot mode allows you to visualize your data in a different way than how they are originally structured in the data source. When pivoting on a column, the values in that column will be used as column headers. This allows you to see the data in a more compact way, and can be useful when you have a lot of data to display.

To enable pivot mode, set the pivot_mode property to True in the grid props. Once pivot mode is enabled, you can define which column to pivot on by setting the pivot property in a column definition. In addition to the pivot column, at least one column definition must have row_group property set to True to define the row grouping.

You can also define how rows are aggregated by passing the agg_func property in the column definition. The agg_func property should be set to a string that represents the aggregation function to use. The built-in aggregation functions are sum, min, max, count, avg, first, and last.

You can find a live example here: Pivot Mode Example.

Pivot using State

Toggle Pivot

Toggle Row Grouping

Home Page

Built with Reflex