Pivot Tables Component

Embed interactive pivot tables for data analysis and cross-tabulation using the rb-pivot-table web component.


Table of Contents

Overview

The <rb-pivot-table> component renders an interactive pivot table for multi-dimensional data analysis. Users can drag and drop fields, change aggregations, and filter data.

ReportBurster Pivot Table

FlowKraft Apps: The FlowKraft Frontend App has this component pre-configured. Just paste your embed code from the Usage tab—no script setup required. See FlowKraft Frontend App for details.

Basic Usage

<rb-pivot-table
  report-code="sales-analysis"
  api-base-url="http://localhost:9090/api/jobman/reporting">
</rb-pivot-table>

Attributes

AttributeRequiredDescription
report-codeYesReport folder name configured in ReportBurster
api-base-urlYesBase URL for API calls

DSL Configuration

Pivot table configuration is defined in ReportBurster using a Groovy DSL.

Basic Structure

pivotTable {
    rows 'Region', 'Product'
    cols 'Quarter'
    vals 'Revenue'
    aggregatorName 'Sum'
    rendererName 'Table'
}

Configuration Reference

PropertyDescriptionExample Values
rowsRow dimensions'Region', 'Product'
colsColumn dimensions'Quarter', 'Year'
valsValue fields to aggregate'Revenue', 'Quantity'
aggregatorNameAggregation function'Sum', 'Count', 'Average'
rendererNameDisplay type'Table', 'Table Heatmap'
rowOrderRow sorting'key_a_to_z', 'value_z_to_a'
colOrderColumn sorting'key_a_to_z', 'value_z_to_a'

Aggregators

  • Count - Count of records
  • Count Unique Values - Distinct count
  • Sum - Total of values
  • Integer Sum - Rounded sum
  • Average - Mean value
  • Median - Middle value
  • Minimum - Lowest value
  • Maximum - Highest value
  • Sum as Fraction of Total - Percentage of total
  • Sum as Fraction of Rows - Percentage of row
  • Sum as Fraction of Columns - Percentage of column

Renderers

  • Table - Standard table
  • Table Heatmap - Colored by value
  • Table Col Heatmap - Colored by column
  • Table Row Heatmap - Colored by row

Value Filters

pivotTable {
    rows 'Region'
    cols 'Quarter'
    vals 'Revenue'
    aggregatorName 'Sum'
    
    valueFilter {
        filter 'Status', exclude: ['Cancelled', 'Pending']
    }
}

Hidden Attributes

pivotTable {
    rows 'Region'
    cols 'Quarter'
    vals 'Revenue'
    
    hiddenAttributes 'InternalID', 'CreatedAt'
    hiddenFromAggregators 'Region', 'Quarter'
}

Examples

Sales by Region and Product

pivotTable {
    rows 'Region', 'Product'
    cols 'Quarter'
    vals 'Revenue'
    aggregatorName 'Sum'
    rendererName 'Table'
    rowOrder 'key_a_to_z'
}

Order Analysis with Filtering

pivotTable {
    rows 'Category'
    cols 'Year', 'Month'
    vals 'OrderCount'
    aggregatorName 'Sum'
    
    valueFilter {
        filter 'Status', exclude: ['Cancelled']
    }
}

Heatmap View

pivotTable {
    rows 'Department'
    cols 'Month'
    vals 'Expenses'
    aggregatorName 'Sum'
    rendererName 'Table Heatmap'
}