View as Markdown

API reference

@salmonui/pivot-table

94 exported symbols: 4 components, 12 functions, 1 class, 58 interfaces, 18 types and 1 constant. Each name links its page with the signature, docs and members. Names re-exported from another entry point are listed there, linked below.

import { … } from '@salmonui/pivot-table';

Components

  • PivotAxisBarThe axis bar. Bind it to the same store as the table: <PivotAxisBar pivot={pivot} />.
  • PivotFieldListThe field list. Bind it to the same store as the table: <PivotFieldList pivot={pivot} />.
  • PivotTableThe pivot table.
  • PivotToolbarThe toolbar.

Functions

  • drillChartPointChart point click → pivot: 'auto' expands the category member when it can expand, else opens drill through for the point's cell; 'collapse' collapses the categ…
  • pivotChartImageA chart image for exportPivot({ format: 'pdf', chart }) or api.exportToPdf({ chart }) (table and chart in one PDF): the chart's PNG (or JPEG) with its drawing…
  • pivotChartPropsChart props of the controller's current result: <Chart {...pivotChartProps(pivot, { type: 'column' })} />. Not memoized; in components use usePivotChartProps().
  • pivotChartPropsOfChartProps of pivot chart data: data, series, axes and an onPointClick that drills the pivot.
  • pivotChartSeriesOptionsThe Chart series options a pivot chart type draws with (type, plus curve / stack / closed).
  • pivotToSeriesConverts a pivot result into Chart data and series for one measure.
  • usePivotCreates the pivot store shared by PivotTable, PivotFieldList, PivotAxisBar, PivotToolbar and the chart adapters. The component that calls it re-renders when th…
  • usePivotChartDatapivotToSeries() of the controller's current result, recomputed when the result changes.
  • usePivotChartPropspivotChartProps() of the store's current result, recomputed only when the result or an option changes.
  • usePivotStateSubscribes to one field of the pivot store. selector must return a value that keeps its identity.

Classes

  • PivotControllerThe store of one pivot report. Create it with usePivot(); pass it to the pivot parts as pivot.

Interfaces

Types

Constants

Re-exported entry points