Birch UI v0.1
Pricing

@birchui/pivot-studio

Pivot Studio: createPivotStudio, reports, data loading, the headless pivot engine and pivot charts.

Open .md
npm install @birchui/pivot-studioLicense: Commercial

Key exports: createPivotStudio, PivotStudioOptions, PivotStudioApi, PivotStudioEvents, PivotReport, createPivotEngine, parseCsv

Guides: Pivot Studio accessibility, Pivot Studio API & events, Calculations, Pivot charts, Loading data, Drill-through & export

@birchui/pivot-studio#

aggregateCubefunction#

function aggregateCube(input: CubeKernelInput): CubeKernelOutput
ParameterTypeDescription
inputCubeKernelInput—

Defined in packages/pivot-studio/src/engine/cube-kernel.ts:41

buildPivotWorkbookfunction#

function buildPivotWorkbook(view: PivotView, options: PivotWorkbookOptions = {}): XlsxWorkbook
ParameterTypeDescription
viewPivotView—
optionsoptionalPivotWorkbookOptions—

Defined in packages/pivot-studio/src/engine/workbook.ts:50

buildRecordsWorkbookfunction#

function buildRecordsWorkbook<TRecord>(records: readonly TRecord[], fields: readonly PivotField[], options: { sheetName?: string; title?: string } = {}): XlsxWorkbook
ParameterTypeDescription
recordsreadonly TRecord[]—
fieldsreadonly PivotField[]—
optionsoptional{ sheetName?: string; title?: string }—

Defined in packages/pivot-studio/src/engine/workbook.ts:148

createPivotEnginefunction#

function createPivotEngine<TRecord = PivotRecord>(options: PivotEngineOptions<TRecord> = {}): PivotEngine<TRecord>
ParameterTypeDescription
optionsoptionalPivotEngineOptions<TRecord>—

Defined in packages/pivot-studio/src/engine/engine.ts:85

createPivotStudiofunction#

function createPivotStudio<TRecord = PivotRecord>(container: HTMLElement, options: PivotStudioOptions<TRecord> = {}): PivotStudioApi<TRecord>
ParameterTypeDescription
containerHTMLElement—
optionsoptionalPivotStudioOptions<TRecord>—

Defined in packages/pivot-studio/src/studio.ts:1036

csvToRecordsfunction#

function csvToRecords(text: string, options: CsvRecordsOptions = {}): CsvRecordsResult
ParameterTypeDescription
textstring—
optionsoptionalCsvRecordsOptions—

Defined in packages/pivot-studio/src/data/source.ts:33

detectFieldTypefunction#

function detectFieldType(values: readonly unknown[]): FieldType
ParameterTypeDescription
valuesreadonly unknown[]—

Defined in packages/pivot-studio/src/data/fields.ts:61

excelNumberFormatfunction#

function excelNumberFormat(resolved: ResolvedFormat): string
ParameterTypeDescription
resolvedResolvedFormat—

Defined in packages/pivot-studio/src/engine/format.ts:108

formatPivotValuefunction#

function formatPivotValue(value: number | null, resolved: ResolvedFormat, locale?: string, emptyText = ''): string
ParameterTypeDescription
valuenumber | null—
resolvedResolvedFormat—
localeoptionalstring—
emptyTextoptionalunknown—

Defined in packages/pivot-studio/src/engine/format.ts:80

humanizeFieldNamefunction#

function humanizeFieldName(name: string): string
ParameterTypeDescription
namestring—

Defined in packages/pivot-studio/src/data/fields.ts:84

inferFieldsfunction#

function inferFields(records: readonly PivotRecord[], definitions: readonly FieldDefinition[] = [], partCaption: (part: DatePart) => string = datePartCaption): PivotField[]
ParameterTypeDescription
recordsreadonly PivotRecord[]—
definitionsoptionalreadonly FieldDefinition[]—
partCaptionoptional(part: DatePart) => string—

Defined in packages/pivot-studio/src/data/fields.ts:130

normalizeReportfunction#

function normalizeReport(input: unknown, warn: Warn = () => {}): PivotReport
ParameterTypeDescription
inputunknown—
warnoptionalWarn—

Defined in packages/pivot-studio/src/report.ts:289

parseCsvfunction#

function parseCsv(text: string, options: CsvParseOptions = {}): string[][]
ParameterTypeDescription
textstring—
optionsoptionalCsvParseOptions—

Defined in packages/pivot-studio/src/data/csv.ts:74

parseDateValuefunction#

function parseDateValue(value: unknown): number
ParameterTypeDescription
valueunknown—

Defined in packages/pivot-studio/src/data/dates.ts:22

parseJsonDatafunction#

function parseJsonData(input: string | unknown, options: JsonDataOptions = {}): PivotRecord[]
ParameterTypeDescription
inputstring | unknown—
optionsoptionalJsonDataOptions—

Defined in packages/pivot-studio/src/data/source.ts:78

pivotChartDatafunction#

function pivotChartData(view: PivotView, options: PivotChartDataOptions = {}): PivotChartData
ParameterTypeDescription
viewPivotView—
optionsoptionalPivotChartDataOptions—

Defined in packages/pivot-studio/src/engine/chart-data.ts:21

pivotViewToMatrixfunction#

function pivotViewToMatrix(view: PivotView, options: PivotMatrixOptions = {}): PivotMatrixCell[][]
ParameterTypeDescription
viewPivotView—
optionsoptionalPivotMatrixOptions—

Defined in packages/pivot-studio/src/engine/matrix.ts:20

sniffDelimiterfunction#

function sniffDelimiter(text: string, candidates: readonly string[] = DELIMITER_CANDIDATES): string
ParameterTypeDescription
textstring—
candidatesoptionalreadonly string[]—

Defined in packages/pivot-studio/src/data/csv.ts:55

InputLimitErrorclass#

class InputLimitError extends Error
new InputLimitError(readonly code: InputLimitCode, readonly limit: number, readonly actual: number, message: string)
MemberTypeDescription
namereadonly"InputLimitError"—
codereadonlyInputLimitCode—
limitreadonlynumber—
actualreadonlynumber—

Defined in packages/core/src/input-limits.ts:4

AGGREGATION_NAMESconst#

const AGGREGATION_NAMES: readonly AggregationName[]

Defined in packages/pivot-studio/src/report.ts:35

DEFAULT_DATA_LIMITSconst#

const DEFAULT_DATA_LIMITS: Readonly<DataLimits>

Defined in packages/pivot-studio/src/data/csv.ts:11

DEFAULT_REPORT_OPTIONSconst#

const DEFAULT_REPORT_OPTIONS: ResolvedReportOptions

Defined in packages/pivot-studio/src/report.ts:22

PIVOT_STUDIO_EVENTSconst#

const PIVOT_STUDIO_EVENTS: readonly ["ready", "reportChange", "cellClick", "drillThrough", "dataLoaded", "pivotUpdated", "error"]

Defined in packages/pivot-studio/src/studio.ts:56

pivotStudioDefinitionconst#

const pivotStudioDefinition: WidgetDefinition<PivotStudioOptions<PivotRecord>, PivotStudioEvents<PivotRecord>, PivotStudioApi<PivotRecord>>

Defined in packages/pivot-studio/src/studio.ts:1043

pivotStudioStylesconst#

const pivotStudioStyles: "\n.lq-pivot {\n --lq-pivot-panel-width: 272px;\n --lq-pivot-chip-bg: #eef3f9;\n --lq-pivot-chip-border: #c9d6e6;\n --lq-pivot-zone-bg: #f9fafb;\n --lq-pivot-zone-over: rgba(31, 111, 235, 0.12);\n --lq-pivot-subtotal-bg: #f3f5f8;\n --lq-pivot-grand-bg: #e8eef7;\n --lq-pivot-negative: #b42318;\n --lq-pivot-toggle-fg: #59636e;\n --lq-pivot-backdrop: rgba(15, 23, 42, 0.45);\n position: relative;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n width: 100%;\n height: 100%;\n min-height: 320px;\n font-family: var(--lq-font-family, system-ui, -apple-system, \"Segoe UI\", Roboto, sans-serif);\n font-size: var(--lq-font-size, 13px);\n line-height: 1.4;\n color: var(--lq-fg);\n background: var(--lq-bg);\n}\n.lq-pivot *, .lq-pivot *::before, .lq-pivot *::after { box-sizing: border-box; }\n.lq-pivot.lq-theme-dark {\n --lq-pivot-chip-bg: #1a2230;\n --lq-pivot-chip-border: #30405a;\n --lq-pivot-zone-bg: #11161d;\n --lq-pivot-zone-over: rgba(68, 147, 248, 0.2);\n --lq-pivot-subtotal-bg: #161c25;\n --lq-pivot-grand-bg: #1c2636;\n --lq-pivot-negative: #ff8b81;\n --lq-pivot-toggle-fg: #9198a1;\n --lq-pivot-backdrop: rgba(0, 0, 0, 0.6);\n}\n@media (prefers-color-scheme: dark) {\n .lq-pivot.lq-theme-auto {\n --lq-pivot-chip-bg: #1a2230;\n --lq-pivot-chip-border: #30405a;\n --lq-pivot-zone-bg: #11161d;\n --lq-pivot-zone-over: rgba(68, 147, 248, 0.2);\n --lq-pivot-subtotal-bg: #161c25;\n --lq-pivot-grand-bg: #1c2636;\n --lq-pivot-negative: #ff8b81;\n --lq-pivot-toggle-fg: #9198a1;\n --lq-pivot-backdrop: rgba(0, 0, 0, 0.6);\n }\n}\n.lq-pivot-fullscreen { position: fixed; inset: 0; z-index: 2147483000; height: 100vh !important; width: 100vw; }\n.lq-pivot:fullscreen { height: 100vh; }\n.lq-pivot button, .lq-pivot select, .lq-pivot input { font: inherit; color: inherit; }\n.lq-pivot :focus-visible { outline: 2px solid var(--lq-focus-ring); outline-offset: 1px; }\n\n.lq-pivot-toolbar {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 6px 12px;\n padding: 6px 8px;\n border: 1px solid var(--lq-border);\n border-bottom: none;\n border-radius: var(--lq-radius, 6px) var(--lq-radius, 6px) 0 0;\n background: var(--lq-header-bg);\n}\n.lq-pivot-toolbar[hidden] { display: none; }\n.lq-pivot-tool-group { display: flex; flex-wrap: wrap; gap: 4px; }\n.lq-pivot-tool-plugins:empty { display: none; }\n.lq-pivot-tool {\n height: 28px;\n padding: 0 10px;\n border: 1px solid var(--lq-input-border, #818b98);\n border-radius: var(--lq-radius, 6px);\n background: var(--lq-bg);\n cursor: pointer;\n white-space: nowrap;\n}\n.lq-pivot-tool:hover { border-color: var(--lq-fg); }\n.lq-pivot-tool[aria-pressed=\"true\"] { background: var(--lq-selection-bg); border-color: var(--lq-accent); }\n.lq-pivot-file { display: none; }\n\n.lq-pivot-body {\n display: flex;\n flex: 1 1 auto;\n min-height: 0;\n border: 1px solid var(--lq-border);\n border-radius: 0 0 var(--lq-radius, 6px) var(--lq-radius, 6px);\n overflow: hidden;\n}\n.lq-pivot-toolbar[hidden] + .lq-pivot-body { border-radius: var(--lq-radius, 6px); }\n.lq-pivot-panel {\n display: flex;\n flex-direction: column;\n flex: 0 0 var(--lq-pivot-panel-width);\n width: var(--lq-pivot-panel-width);\n min-height: 0;\n padding: 8px;\n gap: 8px;\n border-inline-end: 1px solid var(--lq-border);\n background: var(--lq-header-bg);\n overflow: auto;\n}\n.lq-pivot-panel[hidden] { display: none; }\n.lq-pivot-search, .lq-pivot-input {\n width: 100%;\n height: 28px;\n padding: 0 8px;\n border: 1px solid var(--lq-input-border, #818b98);\n border-radius: var(--lq-radius, 6px);\n background: var(--lq-input-bg);\n}\n.lq-pivot-search::placeholder, .lq-pivot-input::placeholder { color: var(--lq-placeholder-fg, var(--lq-muted-fg)); opacity: 1; }\n.lq-pivot-fields {\n flex: 1 1 160px;\n min-height: 96px;\n margin: 0;\n padding: 2px;\n list-style: none;\n overflow: auto;\n border: 1px solid var(--lq-border-subtle);\n border-radius: var(--lq-radius, 6px);\n background: var(--lq-bg);\n}\n.lq-pivot-field {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 3px 6px;\n border-radius: 4px;\n cursor: grab;\n user-select: none;\n}\n.lq-pivot-field:hover { background: var(--lq-row-hover); }\n.lq-pivot-field-child { padding-inline-start: 26px; }\n.lq-pivot-field-used .lq-pivot-field-label { font-weight: 600; }\n.lq-pivot-field-used::after { content: \"●\"; margin-inline-start: auto; font-size: 8px; color: var(--lq-accent); }\n.lq-pivot-type {\n flex: 0 0 auto;\n min-width: 30px;\n padding: 0 4px;\n border-radius: 3px;\n font-size: 10px;\n font-weight: 600;\n text-align: center;\n color: var(--lq-muted-fg);\n background: var(--lq-border-subtle);\n}\n.lq-pivot-type-part { min-width: 14px; background: none; }\n.lq-pivot-field-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.lq-pivot-fields-empty, .lq-pivot-panel-hint { margin: 0; padding: 6px; color: var(--lq-muted-fg); font-size: 12px; }\n.lq-pivot-zones { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }\n.lq-pivot-zone { display: flex; flex-direction: column; min-width: 0; }\n.lq-pivot-zone-title {\n margin: 0 0 3px;\n font-size: 11px;\n font-weight: 600;\n letter-spacing: 0.02em;\n text-transform: uppercase;\n color: var(--lq-muted-fg);\n}\n.lq-pivot-zone-list {\n display: flex;\n flex-direction: column;\n gap: 3px;\n min-height: 64px;\n margin: 0;\n padding: 4px;\n list-style: none;\n border: 1px dashed var(--lq-border);\n border-radius: var(--lq-radius, 6px);\n background: var(--lq-pivot-zone-bg);\n}\n.lq-pivot-zone-over { background: var(--lq-pivot-zone-over); border-color: var(--lq-accent); }\n.lq-pivot-zone-empty { padding: 14px 4px; text-align: center; font-size: 11px; color: var(--lq-muted-fg); }\n.lq-pivot-chip {\n display: flex;\n align-items: center;\n gap: 4px;\n min-width: 0;\n padding-block: 2px;\n padding-inline: 8px 4px;\n border: 1px solid var(--lq-pivot-chip-border);\n border-radius: 4px;\n background: var(--lq-pivot-chip-bg);\n cursor: grab;\n user-select: none;\n}\n.lq-pivot-chip-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.lq-pivot-chip-sort { color: var(--lq-muted-fg); font-size: 11px; }\n.lq-pivot-chip-filtered { border-color: var(--lq-accent); }\n.lq-pivot-chip-filter, .lq-pivot-chip-remove {\n flex: 0 0 auto;\n width: 20px;\n height: 20px;\n padding: 0;\n border: none;\n border-radius: 3px;\n background: none;\n color: var(--lq-muted-fg);\n cursor: pointer;\n line-height: 1;\n}\n.lq-pivot-chip-filter:hover, .lq-pivot-chip-remove:hover { background: var(--lq-row-hover); color: var(--lq-fg); }\n.lq-pivot-active { color: var(--lq-accent); }\n.lq-pivot-agg {\n flex: 0 0 auto;\n max-width: 84px;\n height: 22px;\n border: 1px solid var(--lq-input-border, #818b98);\n border-radius: 3px;\n background: var(--lq-input-bg);\n font-size: 11px;\n}\n.lq-pivot-chip-drop-before { box-shadow: 0 -2px 0 0 var(--lq-accent); }\n.lq-pivot-chip-drop-after { box-shadow: 0 2px 0 0 var(--lq-accent); }\n.lq-pivot-dragging .lq-pivot-zone-list { border-style: solid; }\n\n.lq-pivot-main { position: relative; display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; min-height: 0; }\n.lq-pivot-panels:empty { display: none; }\n.lq-pivot-plugin-panel { border-bottom: 1px solid var(--lq-border); }\n.lq-pivot-panels-bottom .lq-pivot-plugin-panel { border-top: 1px solid var(--lq-border); border-bottom: none; }\n.lq-pivot-table { position: relative; flex: 1 1 auto; min-height: 0; }\n.lq-pivot-table > .lq-grid { border: none; border-radius: 0; min-height: 0; }\n.lq-pivot-busy {\n position: absolute;\n top: 8px;\n inset-inline-end: 12px;\n z-index: 5;\n padding: 2px 10px;\n border-radius: 999px;\n font-size: 12px;\n color: var(--lq-accent-fg);\n background: var(--lq-accent);\n}\n.lq-pivot-busy[hidden] { display: none; }\n.lq-pivot-live {\n position: absolute;\n width: 1px;\n height: 1px;\n margin: -1px;\n padding: 0;\n overflow: hidden;\n clip: rect(0 0 0 0);\n white-space: nowrap;\n border: 0;\n}\n\n.lq-pivot-header { display: flex; flex-direction: column; }\n.lq-pivot-header-row {\n display: flex;\n height: var(--lq-header-height, 38px);\n border-bottom: 1px solid var(--lq-border-subtle);\n}\n.lq-pivot-header-corner {\n flex: 0 0 auto;\n display: flex;\n align-items: center;\n padding: 0 var(--lq-cell-padding, 10px);\n border-inline-end: 1px solid var(--lq-border);\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.02em;\n color: var(--lq-muted-fg);\n overflow: hidden;\n white-space: nowrap;\n}\n.lq-pivot-header-clip { position: relative; flex: 1 1 auto; overflow: hidden; }\n.lq-pivot-header-track { position: relative; height: 100%; will-change: transform; }\n.lq-pivot-header-span {\n position: absolute;\n top: 0;\n bottom: 0;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 4px;\n padding: 0 6px;\n border-inline-end: 1px solid var(--lq-border-subtle);\n font-weight: 600;\n color: var(--lq-header-fg);\n overflow: hidden;\n white-space: nowrap;\n}\n.lq-pivot-header-blank { border-inline-end-color: transparent; }\n.lq-pivot-header-text { overflow: hidden; text-overflow: ellipsis; }\n\n.lq-pivot-row-leaf { font-weight: 400; }\n.lq-pivot-row-parent { font-weight: 600; }\n.lq-pivot-row-subtotal { font-weight: 600; background: var(--lq-pivot-subtotal-bg); }\n.lq-pivot-row-grand { font-weight: 700; background: var(--lq-pivot-grand-bg); }\n.lq-pivot-row-subtotal .lq-cell, .lq-pivot-row-grand .lq-cell { background: inherit; }\n.lq-pivot-label { display: inline-flex; align-items: center; gap: 2px; min-width: 0; max-width: 100%; }\n.lq-pivot-label-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.lq-pivot-toggle {\n flex: 0 0 auto;\n width: 18px;\n height: 18px;\n padding: 0;\n border: none;\n border-radius: 3px;\n background: none;\n color: var(--lq-pivot-toggle-fg);\n cursor: pointer;\n line-height: 1;\n}\n.lq-pivot-toggle:hover { background: var(--lq-row-hover); color: var(--lq-fg); }\n.lq-pivot-toggle-space { display: inline-block; flex: 0 0 auto; width: 20px; }\n.lq-pivot-total-cell { font-weight: 600; }\n.lq-pivot-negative { color: var(--lq-pivot-negative); }\n.lq-pivot-cf-bar {\n background-image: linear-gradient(90deg, var(--lq-pivot-bar-color, rgba(99, 142, 198, 0.45)) var(--lq-pivot-bar, 0%), transparent var(--lq-pivot-bar, 0%));\n background-repeat: no-repeat;\n background-size: calc(100% - 4px) 70%;\n background-position: 2px center;\n}\n.lq-pivot-cf-scale, .lq-pivot-cf-threshold { transition: none; }\n\n.lq-pivot-menu, .lq-pivot-filter {\n position: absolute;\n z-index: 40;\n min-width: 200px;\n max-width: min(360px, calc(100% - 8px));\n max-height: min(480px, calc(100% - 16px));\n overflow: auto;\n padding: 4px;\n border: 1px solid var(--lq-border);\n border-radius: var(--lq-radius, 6px);\n background: var(--lq-menu-bg);\n box-shadow: var(--lq-menu-shadow);\n}\n.lq-pivot-menu-item {\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n padding-block: 5px;\n padding-inline: 4px 10px;\n border: none;\n border-radius: 4px;\n background: none;\n text-align: start;\n cursor: pointer;\n}\n.lq-pivot-menu-item:hover, .lq-pivot-menu-item:focus { background: var(--lq-row-hover); outline: none; }\n.lq-pivot-menu-item:focus-visible { outline: 2px solid var(--lq-focus-ring); outline-offset: -2px; }\n.lq-pivot-menu-item[disabled] { opacity: 0.5; cursor: default; }\n.lq-pivot-menu-check { display: inline-block; width: 16px; text-align: center; color: var(--lq-accent); }\n.lq-pivot-menu-heading {\n padding: 6px 10px 2px;\n padding-inline-start: 26px;\n font-size: 11px;\n font-weight: 600;\n text-transform: uppercase;\n letter-spacing: 0.02em;\n color: var(--lq-muted-fg);\n}\n.lq-pivot-menu-separator { height: 1px; margin: 4px 0; background: var(--lq-border-subtle); }\n\n.lq-pivot-filter { width: 300px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }\n.lq-pivot-filter-title { margin: 0; font-size: 14px; }\n.lq-pivot-filter-members {\n display: flex;\n flex-direction: column;\n max-height: 200px;\n overflow: auto;\n padding: 4px;\n border: 1px solid var(--lq-border-subtle);\n border-radius: var(--lq-radius, 6px);\n}\n.lq-pivot-check { display: flex; align-items: center; gap: 6px; padding: 2px 2px; cursor: pointer; }\n.lq-pivot-check-all { font-weight: 600; }\n.lq-pivot-filter-note { margin: 0; font-size: 12px; color: var(--lq-muted-fg); }\n.lq-pivot-filter-note:empty { display: none; }\n.lq-pivot-fieldset {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 6px;\n margin: 0;\n padding: 6px 8px 8px;\n border: 1px solid var(--lq-border-subtle);\n border-radius: var(--lq-radius, 6px);\n}\n.lq-pivot-fieldset legend { padding: 0 4px; font-size: 12px; font-weight: 600; color: var(--lq-muted-fg); }\n.lq-pivot-fieldset > select:first-of-type { grid-column: 1 / -1; }\n.lq-pivot-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }\n.lq-pivot-button {\n height: 28px;\n padding: 0 12px;\n border: 1px solid var(--lq-border);\n border-radius: var(--lq-radius, 6px);\n background: var(--lq-bg);\n cursor: pointer;\n}\n.lq-pivot-button:hover { border-color: var(--lq-muted-fg); }\n.lq-pivot-button-primary { border-color: var(--lq-accent); background: var(--lq-accent); color: var(--lq-accent-fg); }\n\n.lq-pivot-backdrop {\n position: absolute;\n inset: 0;\n z-index: 50;\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 24px;\n background: var(--lq-pivot-backdrop);\n}\n.lq-pivot-dialog {\n display: flex;\n flex-direction: column;\n width: min(960px, 100%);\n height: min(560px, 100%);\n border: 1px solid var(--lq-border);\n border-radius: var(--lq-radius, 6px);\n background: var(--lq-bg);\n box-shadow: var(--lq-menu-shadow);\n overflow: hidden;\n}\n.lq-pivot-dialog-head {\n display: flex;\n flex-wrap: wrap;\n align-items: flex-start;\n justify-content: space-between;\n gap: 8px;\n padding: 10px 12px;\n border-bottom: 1px solid var(--lq-border);\n background: var(--lq-header-bg);\n}\n.lq-pivot-dialog-title { margin: 0; font-size: 15px; }\n.lq-pivot-dialog-subtitle { margin: 2px 0 0; font-size: 12px; color: var(--lq-muted-fg); }\n.lq-pivot-dialog-close { width: 28px; padding: 0; font-size: 16px; }\n.lq-pivot-drill-grid { flex: 1 1 auto; min-height: 0; }\n.lq-pivot-drill-grid > .lq-grid { border: none; border-radius: 0; }\n\n.lq-pivot-chart { padding: 8px; min-height: 240px; }\n.lq-pivot-chart[hidden] { display: none; }\n\n@media (max-width: 720px) {\n .lq-pivot-body { flex-direction: column; }\n .lq-pivot-panel { flex: 0 0 auto; width: 100%; max-height: 45%; border-inline-end: none; border-bottom: 1px solid var(--lq-border); }\n}\n@media (prefers-reduced-motion: reduce) {\n .lq-pivot *, .lq-pivot *::before, .lq-pivot *::after { transition: none !important; animation: none !important; }\n}\n@media (forced-colors: active) {\n .lq-pivot :focus-visible, .lq-pivot-menu :focus-visible, .lq-pivot-filter :focus-visible {\n outline: 2px solid Highlight !important;\n }\n .lq-pivot-tool[aria-pressed=\"true\"], .lq-pivot-chip-filtered { border: 2px solid Highlight; }\n .lq-pivot-zone-over { outline: 2px dashed Highlight; }\n .lq-pivot-chip-drop-before { border-top: 3px solid Highlight; }\n .lq-pivot-chip-drop-after { border-bottom: 3px solid Highlight; }\n}\n" = ` .lq-pivot { --lq-pivot-panel-width: 272px; --lq-pivot-chip-bg: #eef3f9; --lq-pivot-chip-border: #c9d6e6; --lq-pivot-zone-bg: #f9fafb; --lq-pivot-zone-over: rgba(31, 111, 235, 0.12); --lq-pivot-subtotal-bg: #f3f5f8; --lq-pivot-grand-bg: #e8eef7; --lq-pivot-negative: #b42318; --lq-pivot-toggle-fg: #59636e; --lq-pivot-backdrop: rgba(15, 23, 42, 0.45); position: relative; display: flex; flex-direction: column; box-sizing: border-box; width: 100%; height: 100%; min-height: 320px; font-family: var(--lq-font-family, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif); font-size: var(--lq-font-size, 13px); line-height: 1.4; color: var(--lq-fg); background: var(--lq-bg); } .lq-pivot *, .lq-pivot *::before, .lq-pivot *::after { box-sizing: border-box; } .lq-pivot.lq-theme-dark { --lq-pivot-chip-bg: #1a2230; --lq-pivot-chip-border: #30405a; --lq-pivot-zone-bg: #11161d; --lq-pivot-zone-over: rgba(68, 147, 248, 0.2); --lq-pivot-subtotal-bg: #161c25; --lq-pivot-grand-bg: #1c2636; --lq-pivot-negative: #ff8b81; --lq-pivot-toggle-fg: #9198a1; --lq-pivot-backdrop: rgba(0, 0, 0, 0.6); } @media (prefers-color-scheme: dark) { .lq-pivot.lq-theme-auto { --lq-pivot-chip-bg: #1a2230; --lq-pivot-chip-border: #30405a; --lq-pivot-zone-bg: #11161d; --lq-pivot-zone-over: rgba(68, 147, 248, 0.2); --lq-pivot-subtotal-bg: #161c25; --lq-pivot-grand-bg: #1c2636; --lq-pivot-negative: #ff8b81; --lq-pivot-toggle-fg: #9198a1; --lq-pivot-backdrop: rgba(0, 0, 0, 0.6); } } .lq-pivot-fullscreen { position: fixed; inset: 0; z-index: 2147483000; height: 100vh !important; width: 100vw; } .lq-pivot:fullscreen { height: 100vh; } .lq-pivot button, .lq-pivot select, .lq-pivot input { font: inherit; color: inherit; } .lq-pivot :focus-visible { outline: 2px solid var(--lq-focus-ring); outline-offset: 1px; } .lq-pivot-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 6px 8px; border: 1px solid var(--lq-border); border-bottom: none; border-radius: var(--lq-radius, 6px) var(--lq-radius, 6px) 0 0; background: var(--lq-header-bg); } .lq-pivot-toolbar[hidden] { display: none; } .lq-pivot-tool-group { display: flex; flex-wrap: wrap; gap: 4px; } .lq-pivot-tool-plugins:empty { display: none; } .lq-pivot-tool { height: 28px; padding: 0 10px; border: 1px solid var(--lq-input-border, #818b98); border-radius: var(--lq-radius, 6px); background: var(--lq-bg); cursor: pointer; white-space: nowrap; } .lq-pivot-tool:hover { border-color: var(--lq-fg); } .lq-pivot-tool[aria-pressed="true"] { background: var(--lq-selection-bg); border-color: var(--lq-accent); } .lq-pivot-file { display: none; } .lq-pivot-body { display: flex; flex: 1 1 auto; min-height: 0; border: 1px solid var(--lq-border); border-radius: 0 0 var(--lq-radius, 6px) var(--lq-radius, 6px); overflow: hidden; } .lq-pivot-toolbar[hidden] + .lq-pivot-body { border-radius: var(--lq-radius, 6px); } .lq-pivot-panel { display: flex; flex-direction: column; flex: 0 0 var(--lq-pivot-panel-width); width: var(--lq-pivot-panel-width); min-height: 0; padding: 8px; gap: 8px; border-inline-end: 1px solid var(--lq-border); background: var(--lq-header-bg); overflow: auto; } .lq-pivot-panel[hidden] { display: none; } .lq-pivot-search, .lq-pivot-input { width: 100%; height: 28px; padding: 0 8px; border: 1px solid var(--lq-input-border, #818b98); border-radius: var(--lq-radius, 6px); background: var(--lq-input-bg); } .lq-pivot-search::placeholder, .lq-pivot-input::placeholder { color: var(--lq-placeholder-fg, var(--lq-muted-fg)); opacity: 1; } .lq-pivot-fields { flex: 1 1 160px; min-height: 96px; margin: 0; padding: 2px; list-style: none; overflow: auto; border: 1px solid var(--lq-border-subtle); border-radius: var(--lq-radius, 6px); background: var(--lq-bg); } .lq-pivot-field { display: flex; align-items: center; gap: 8px; padding: 3px 6px; border-radius: 4px; cursor: grab; user-select: none; } .lq-pivot-field:hover { background: var(--lq-row-hover); } .lq-pivot-field-child { padding-inline-start: 26px; } .lq-pivot-field-used .lq-pivot-field-label { font-weight: 600; } .lq-pivot-field-used::after { content: "●"; margin-inline-start: auto; font-size: 8px; color: var(--lq-accent); } .lq-pivot-type { flex: 0 0 auto; min-width: 30px; padding: 0 4px; border-radius: 3px; font-size: 10px; font-weight: 600; text-align: center; color: var(--lq-muted-fg); background: var(--lq-border-subtle); } .lq-pivot-type-part { min-width: 14px; background: none; } .lq-pivot-field-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lq-pivot-fields-empty, .lq-pivot-panel-hint { margin: 0; padding: 6px; color: var(--lq-muted-fg); font-size: 12px; } .lq-pivot-zones { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; } .lq-pivot-zone { display: flex; flex-direction: column; min-width: 0; } .lq-pivot-zone-title { margin: 0 0 3px; font-size: 11px; font-weight: 600; letter-spacing: 0.02em; text-transform: uppercase; color: var(--lq-muted-fg); } .lq-pivot-zone-list { display: flex; flex-direction: column; gap: 3px; min-height: 64px; margin: 0; padding: 4px; list-style: none; border: 1px dashed var(--lq-border); border-radius: var(--lq-radius, 6px); background: var(--lq-pivot-zone-bg); } .lq-pivot-zone-over { background: var(--lq-pivot-zone-over); border-color: var(--lq-accent); } .lq-pivot-zone-empty { padding: 14px 4px; text-align: center; font-size: 11px; color: var(--lq-muted-fg); } .lq-pivot-chip { display: flex; align-items: center; gap: 4px; min-width: 0; padding-block: 2px; padding-inline: 8px 4px; border: 1px solid var(--lq-pivot-chip-border); border-radius: 4px; background: var(--lq-pivot-chip-bg); cursor: grab; user-select: none; } .lq-pivot-chip-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lq-pivot-chip-sort { color: var(--lq-muted-fg); font-size: 11px; } .lq-pivot-chip-filtered { border-color: var(--lq-accent); } .lq-pivot-chip-filter, .lq-pivot-chip-remove { flex: 0 0 auto; width: 20px; height: 20px; padding: 0; border: none; border-radius: 3px; background: none; color: var(--lq-muted-fg); cursor: pointer; line-height: 1; } .lq-pivot-chip-filter:hover, .lq-pivot-chip-remove:hover { background: var(--lq-row-hover); color: var(--lq-fg); } .lq-pivot-active { color: var(--lq-accent); } .lq-pivot-agg { flex: 0 0 auto; max-width: 84px; height: 22px; border: 1px solid var(--lq-input-border, #818b98); border-radius: 3px; background: var(--lq-input-bg); font-size: 11px; } .lq-pivot-chip-drop-before { box-shadow: 0 -2px 0 0 var(--lq-accent); } .lq-pivot-chip-drop-after { box-shadow: 0 2px 0 0 var(--lq-accent); } .lq-pivot-dragging .lq-pivot-zone-list { border-style: solid; } .lq-pivot-main { position: relative; display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; min-height: 0; } .lq-pivot-panels:empty { display: none; } .lq-pivot-plugin-panel { border-bottom: 1px solid var(--lq-border); } .lq-pivot-panels-bottom .lq-pivot-plugin-panel { border-top: 1px solid var(--lq-border); border-bottom: none; } .lq-pivot-table { position: relative; flex: 1 1 auto; min-height: 0; } .lq-pivot-table > .lq-grid { border: none; border-radius: 0; min-height: 0; } .lq-pivot-busy { position: absolute; top: 8px; inset-inline-end: 12px; z-index: 5; padding: 2px 10px; border-radius: 999px; font-size: 12px; color: var(--lq-accent-fg); background: var(--lq-accent); } .lq-pivot-busy[hidden] { display: none; } .lq-pivot-live { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; } .lq-pivot-header { display: flex; flex-direction: column; } .lq-pivot-header-row { display: flex; height: var(--lq-header-height, 38px); border-bottom: 1px solid var(--lq-border-subtle); } .lq-pivot-header-corner { flex: 0 0 auto; display: flex; align-items: center; padding: 0 var(--lq-cell-padding, 10px); border-inline-end: 1px solid var(--lq-border); font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; color: var(--lq-muted-fg); overflow: hidden; white-space: nowrap; } .lq-pivot-header-clip { position: relative; flex: 1 1 auto; overflow: hidden; } .lq-pivot-header-track { position: relative; height: 100%; will-change: transform; } .lq-pivot-header-span { position: absolute; top: 0; bottom: 0; display: flex; align-items: center; justify-content: center; gap: 4px; padding: 0 6px; border-inline-end: 1px solid var(--lq-border-subtle); font-weight: 600; color: var(--lq-header-fg); overflow: hidden; white-space: nowrap; } .lq-pivot-header-blank { border-inline-end-color: transparent; } .lq-pivot-header-text { overflow: hidden; text-overflow: ellipsis; } .lq-pivot-row-leaf { font-weight: 400; } .lq-pivot-row-parent { font-weight: 600; } .lq-pivot-row-subtotal { font-weight: 600; background: var(--lq-pivot-subtotal-bg); } .lq-pivot-row-grand { font-weight: 700; background: var(--lq-pivot-grand-bg); } .lq-pivot-row-subtotal .lq-cell, .lq-pivot-row-grand .lq-cell { background: inherit; } .lq-pivot-label { display: inline-flex; align-items: center; gap: 2px; min-width: 0; max-width: 100%; } .lq-pivot-label-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .lq-pivot-toggle { flex: 0 0 auto; width: 18px; height: 18px; padding: 0; border: none; border-radius: 3px; background: none; color: var(--lq-pivot-toggle-fg); cursor: pointer; line-height: 1; } .lq-pivot-toggle:hover { background: var(--lq-row-hover); color: var(--lq-fg); } .lq-pivot-toggle-space { display: inline-block; flex: 0 0 auto; width: 20px; } .lq-pivot-total-cell { font-weight: 600; } .lq-pivot-negative { color: var(--lq-pivot-negative); } .lq-pivot-cf-bar { background-image: linear-gradient(90deg, var(--lq-pivot-bar-color, rgba(99, 142, 198, 0.45)) var(--lq-pivot-bar, 0%), transparent var(--lq-pivot-bar, 0%)); background-repeat: no-repeat; background-size: calc(100% - 4px) 70%; background-position: 2px center; } .lq-pivot-cf-scale, .lq-pivot-cf-threshold { transition: none; } .lq-pivot-menu, .lq-pivot-filter { position: absolute; z-index: 40; min-width: 200px; max-width: min(360px, calc(100% - 8px)); max-height: min(480px, calc(100% - 16px)); overflow: auto; padding: 4px; border: 1px solid var(--lq-border); border-radius: var(--lq-radius, 6px); background: var(--lq-menu-bg); box-shadow: var(--lq-menu-shadow); } .lq-pivot-menu-item { display: flex; align-items: center; gap: 6px; width: 100%; padding-block: 5px; padding-inline: 4px 10px; border: none; border-radius: 4px; background: none; text-align: start; cursor: pointer; } .lq-pivot-menu-item:hover, .lq-pivot-menu-item:focus { background: var(--lq-row-hover); outline: none; } .lq-pivot-menu-item:focus-visible { outline: 2px solid var(--lq-focus-ring); outline-offset: -2px; } .lq-pivot-menu-item[disabled] { opacity: 0.5; cursor: default; } .lq-pivot-menu-check { display: inline-block; width: 16px; text-align: center; color: var(--lq-accent); } .lq-pivot-menu-heading { padding: 6px 10px 2px; padding-inline-start: 26px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.02em; color: var(--lq-muted-fg); } .lq-pivot-menu-separator { height: 1px; margin: 4px 0; background: var(--lq-border-subtle); } .lq-pivot-filter { width: 300px; padding: 10px; display: flex; flex-direction: column; gap: 8px; } .lq-pivot-filter-title { margin: 0; font-size: 14px; } .lq-pivot-filter-members { display: flex; flex-direction: column; max-height: 200px; overflow: auto; padding: 4px; border: 1px solid var(--lq-border-subtle); border-radius: var(--lq-radius, 6px); } .lq-pivot-check { display: flex; align-items: center; gap: 6px; padding: 2px 2px; cursor: pointer; } .lq-pivot-check-all { font-weight: 600; } .lq-pivot-filter-note { margin: 0; font-size: 12px; color: var(--lq-muted-fg); } .lq-pivot-filter-note:empty { display: none; } .lq-pivot-fieldset { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 0; padding: 6px 8px 8px; border: 1px solid var(--lq-border-subtle); border-radius: var(--lq-radius, 6px); } .lq-pivot-fieldset legend { padding: 0 4px; font-size: 12px; font-weight: 600; color: var(--lq-muted-fg); } .lq-pivot-fieldset > select:first-of-type { grid-column: 1 / -1; } .lq-pivot-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; } .lq-pivot-button { height: 28px; padding: 0 12px; border: 1px solid var(--lq-border); border-radius: var(--lq-radius, 6px); background: var(--lq-bg); cursor: pointer; } .lq-pivot-button:hover { border-color: var(--lq-muted-fg); } .lq-pivot-button-primary { border-color: var(--lq-accent); background: var(--lq-accent); color: var(--lq-accent-fg); } .lq-pivot-backdrop { position: absolute; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--lq-pivot-backdrop); } .lq-pivot-dialog { display: flex; flex-direction: column; width: min(960px, 100%); height: min(560px, 100%); border: 1px solid var(--lq-border); border-radius: var(--lq-radius, 6px); background: var(--lq-bg); box-shadow: var(--lq-menu-shadow); overflow: hidden; } .lq-pivot-dialog-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--lq-border); background: var(--lq-header-bg); } .lq-pivot-dialog-title { margin: 0; font-size: 15px; } .lq-pivot-dialog-subtitle { margin: 2px 0 0; font-size: 12px; color: var(--lq-muted-fg); } .lq-pivot-dialog-close { width: 28px; padding: 0; font-size: 16px; } .lq-pivot-drill-grid { flex: 1 1 auto; min-height: 0; } .lq-pivot-drill-grid > .lq-grid { border: none; border-radius: 0; } .lq-pivot-chart { padding: 8px; min-height: 240px; } .lq-pivot-chart[hidden] { display: none; } @media (max-width: 720px) { .lq-pivot-body { flex-direction: column; } .lq-pivot-panel { flex: 0 0 auto; width: 100%; max-height: 45%; border-inline-end: none; border-bottom: 1px solid var(--lq-border); } } @media (prefers-reduced-motion: reduce) { .lq-pivot *, .lq-pivot *::before, .lq-pivot *::after { transition: none !important; animation: none !important; } } @media (forced-colors: active) { .lq-pivot :focus-visible, .lq-pivot-menu :focus-visible, .lq-pivot-filter :focus-visible { outline: 2px solid Highlight !important; } .lq-pivot-tool[aria-pressed="true"], .lq-pivot-chip-filtered { border: 2px solid Highlight; } .lq-pivot-zone-over { outline: 2px dashed Highlight; } .lq-pivot-chip-drop-before { border-top: 3px solid Highlight; } .lq-pivot-chip-drop-after { border-bottom: 3px solid Highlight; } } `

Defined in packages/pivot-studio/src/styles.ts:1

SHOW_VALUES_ASconst#

const SHOW_VALUES_AS: readonly ShowValuesAs[]

Defined in packages/pivot-studio/src/report.ts:45

CellClickEventinterface#

interface CellClickEvent
PropertyTypeDescription
rowPathstring[]—
colPathstring[]—
measurestring | null—
valuenumber | null—
rowKindPivotRowKind—
columnKindPivotRowKind | null—

Defined in packages/pivot-studio/src/types.ts:298

CellStyleinterface#

interface CellStyle
PropertyTypeDescription
backgroundoptionalstring—
coloroptionalstring—
boldoptionalboolean—
baroptional{ ratio: number; negative: boolean; color: string }—
classNamesstring[]—

Defined in packages/pivot-studio/src/types.ts:250

ColorScaleRuleinterface#

interface ColorScaleRule extends ConditionalFormatBase
PropertyTypeDescription
type'colorScale'—
minColoroptionalstring—
midColoroptionalstring—
maxColoroptionalstring—
idoptionalstring | undefinedInherited from ConditionalFormatBase.
measureoptionalstring | undefinedInherited from ConditionalFormatBase.
includeTotalsoptionalboolean | undefinedInherited from ConditionalFormatBase.

Defined in packages/pivot-studio/src/types.ts:133

CsvExportOptionsinterface#

interface CsvExportOptions extends PivotMatrixOptions
PropertyTypeDescription
separatoroptionalstring—
downloadoptionalboolean—
fileNameoptionalstring—
formattedoptionalboolean | undefinedInherited from PivotMatrixOptions.
headersoptional"stacked" | "flat" | undefinedInherited from PivotMatrixOptions.

Defined in packages/pivot-studio/src/types.ts:285

CsvParseOptionsinterface#

interface CsvParseOptions
PropertyTypeDescription
delimiteroptionalstring—
quoteoptionalstring—
skipEmptyLinesoptionalboolean—
limitsoptionalPartial<DataLimits>—

Defined in packages/pivot-studio/src/data/csv.ts:17

CsvRecordsOptionsinterface#

interface CsvRecordsOptions
PropertyTypeDescription
delimiteroptionalstring—
headeroptionalboolean—
typesoptionalRecord<string, FieldType>—
limitsoptionalPartial<DataLimits>—

Defined in packages/pivot-studio/src/data/source.ts:6

CsvRecordsResultinterface#

interface CsvRecordsResult
PropertyTypeDescription
recordsPivotRecord[]—
columnsstring[]—
delimiterstring—

Defined in packages/pivot-studio/src/data/source.ts:17

CubeKernelInputinterface#

interface CubeKernelInput
PropertyTypeDescription
recordCountnumber—
indicesInt32Array | null—
rowsKernelDimension[]—
columnsKernelDimension[]—
measuresKernelMeasure[]—
denseLimitoptionalnumber—
keepRowLeafoptionalboolean—

Defined in packages/pivot-studio/src/engine/cube-kernel.ts:13

CubeKernelOutputinterface#

interface CubeKernelOutput
PropertyTypeDescription
rowTreeAxisTree—
colTreeAxisTree—
denseboolean—
slotsFloat64Array | null—
hitsFloat64Array—
valuesFloat64Array[]—
rowLeafOfInt32Array | null—
selectednumber—

Defined in packages/pivot-studio/src/engine/cube-kernel.ts:30

DataBarRuleinterface#

interface DataBarRule extends ConditionalFormatBase
PropertyTypeDescription
type'dataBar'—
coloroptionalstring—
negativeColoroptionalstring—
idoptionalstring | undefinedInherited from ConditionalFormatBase.
measureoptionalstring | undefinedInherited from ConditionalFormatBase.
includeTotalsoptionalboolean | undefinedInherited from ConditionalFormatBase.

Defined in packages/pivot-studio/src/types.ts:140

DataLimitsinterface#

interface DataLimits
PropertyTypeDescription
maxLengthnumber—
maxRowsnumber—
maxColumnsnumber—

Defined in packages/pivot-studio/src/data/csv.ts:5

DrillThroughEventinterface#

interface DrillThroughEvent<TRecord = PivotRecord>
PropertyTypeDescription
recordsTRecord[]—
rowPathstring[]—
colPathstring[]—
measurestring | null—

Defined in packages/pivot-studio/src/types.ts:307

ExcelExportOptionsinterface#

interface ExcelExportOptions
PropertyTypeDescription
downloadoptionalboolean—
fileNameoptionalstring—
sheetNameoptionalstring—
titleoptionalstring—

Defined in packages/pivot-studio/src/types.ts:291

ExpansionSpecinterface#

interface ExpansionSpec
PropertyTypeDescription
allboolean—
exceptoptionalstring[][]—

Defined in packages/pivot-studio/src/types.ts:172

FieldDefinitioninterface#

interface FieldDefinition
PropertyTypeDescription
namestring—
captionoptionalstring—
typeoptionalFieldType—
formatoptionalPivotNumberFormat—
datePartsoptionalboolean | DatePart[]—
hiddenoptionalboolean—

Defined in packages/pivot-studio/src/types.ts:44

FieldFilterinterface#

interface FieldFilter
PropertyTypeDescription
includeoptionalstring[]—
excludeoptionalstring[]—
labeloptionalLabelFilter—
valueoptionalValueFilter—
topoptionalTopFilter—

Defined in packages/pivot-studio/src/types.ts:119

JsonDataOptionsinterface#

interface JsonDataOptions
PropertyTypeDescription
limitsoptionalPartial<DataLimits>—

Defined in packages/pivot-studio/src/data/source.ts:13

LabelFilterinterface#

interface LabelFilter
PropertyTypeDescription
opLabelFilterOp—
valuestring—
caseSensitiveoptionalboolean—

Defined in packages/pivot-studio/src/types.ts:100

MeasureSortinterface#

interface MeasureSort
PropertyTypeDescription
measurestring—
dirSortDirection—
pathoptionalstring[]—

Defined in packages/pivot-studio/src/types.ts:65

PivotChartDatainterface#

interface PivotChartData
PropertyTypeDescription
categoriesstring[]—
seriesPivotChartSeries[]—

Defined in packages/pivot-studio/src/engine/chart-data.ts:10

PivotChartDataOptionsinterface#

interface PivotChartDataOptions
PropertyTypeDescription
measureoptionalstring—
maxCategoriesoptionalnumber—
maxSeriesoptionalnumber—

Defined in packages/pivot-studio/src/engine/chart-data.ts:15

PivotChartSeriesinterface#

interface PivotChartSeries
PropertyTypeDescription
idstring—
namestring—
measurestring—
values(number | null)[]—

Defined in packages/pivot-studio/src/engine/chart-data.ts:3

PivotDataSourceRefinterface#

interface PivotDataSourceRef
PropertyTypeDescription
typeoptionalDataFormat—
refoptionalstring—
delimiteroptionalstring—
fieldsoptionalFieldDefinition[]—

Defined in packages/pivot-studio/src/types.ts:177

PivotEngineinterface#

interface PivotEngine<TRecord = PivotRecord>
PropertyTypeDescription
dataFormatreadonlyExclude<DataFormat, 'auto'>—
delimiterreadonlystring | undefined—
setData()(data: readonly TRecord[] | string, options?: SetDataOptions) => void—
setFieldDefinitions()(fields: FieldDefinition[] | undefined) => void—
setLocale()(locale: string | undefined) => void—
setTranslator()(translate: Translate) => void—
invalidate()() => void—
getRecords()() => readonly TRecord[]—
getFields()() => PivotField[]—
getField()(name: string) => PivotField | undefined—
getMembers()(field: string) => PivotMember[]—
setReport()(report: PivotReport) => void—
getReport()() => PivotReport—
current()() => PivotReport—
setExpanded()(axis: PivotAxis, path: readonly string[], expanded: boolean) => void—
setAllExpanded()(axis: PivotAxis, expanded: boolean) => void—
isCollapsed()(axis: PivotAxis, path: readonly string[]) => boolean—
needsCompute()() => boolean—
compute()() => PivotViewModel—
computeAsync()(runner: KernelRunner) => Promise<PivotViewModel>—
rebuildView()() => PivotViewModel—
getView()() => PivotViewModel | null—
drillThrough()(rowPath: readonly string[], colPath?: readonly string[]) => TRecord[]—
getMatrix()(options?: PivotMatrixOptions) => PivotMatrixCell[][]—
buildWorkbook()(options?: PivotWorkbookOptions) => XlsxWorkbook—

Defined in packages/pivot-studio/src/engine/engine.ts:48

PivotEngineOptionsinterface#

interface PivotEngineOptions<TRecord = PivotRecord>
PropertyTypeDescription
dataoptionalreadonly TRecord[] | string—
dataFormatoptionalDataFormat—
csvDelimiteroptionalstring—
dataLimitsoptionalPartial<DataLimits>—
fieldsoptionalFieldDefinition[]—
reportoptionalPivotReport—
localeoptionalstring—
translateoptionalTranslate—
onWarningoptional(message: string) => void—

Defined in packages/pivot-studio/src/engine/engine.ts:36

PivotFieldinterface#

interface PivotField
PropertyTypeDescription
namereadonlystring—
captionreadonlystring—
typereadonlyFieldType—
sourcereadonlystring—
formatoptionalreadonlyPivotNumberFormat—
datePartoptionalreadonlyDatePart—
parentoptionalreadonlystring—
integerreadonlyboolean—
hiddenreadonlyboolean—

Defined in packages/pivot-studio/src/types.ts:53

PivotHeaderSpaninterface#

interface PivotHeaderSpan
PropertyTypeDescription
startreadonlynumber—
spanreadonlynumber—
labelreadonlystring—
nodereadonlynumber—
expandablereadonlyboolean—
expandedreadonlyboolean—

Defined in packages/pivot-studio/src/types.ts:241

PivotMatrixOptionsinterface#

interface PivotMatrixOptions
PropertyTypeDescription
formattedoptionalboolean—
headersoptional'stacked' | 'flat'—

Defined in packages/pivot-studio/src/types.ts:278

PivotMeasureInfointerface#

interface PivotMeasureInfo
PropertyTypeDescription
idstring—
fieldstring—
captionstring—
aggregationAggregationName—
showAsShowValuesAs—
alongPivotAxis—

Defined in packages/pivot-studio/src/types.ts:201

PivotMemberinterface#

interface PivotMember
PropertyTypeDescription
keystring—
labelstring—
isBlankboolean—

Defined in packages/pivot-studio/src/types.ts:195

PivotNumberFormatinterface#

interface PivotNumberFormat
PropertyTypeDescription
styleoptional'number' | 'currency' | 'percent'—
currencyoptionalstring—
decimalsoptionalnumber—
thousandsoptionalboolean—
prefixoptionalstring—
suffixoptionalstring—
nullTextoptionalstring—
exceloptionalstring—

Defined in packages/pivot-studio/src/types.ts:33

PivotReportinterface#

interface PivotReport
PropertyTypeDescription
versionoptional1—
dataSourceoptionalPivotDataSourceRef—
slicePivotSlice—
filtersoptionalRecord<string, FieldFilter>—
formatsoptionalRecord<string, PivotNumberFormat>—
conditionalFormatsoptionalConditionalFormatRule[]—
optionsoptionalPivotReportOptions—
expansionoptional{ rows?: ExpansionSpec; columns?: ExpansionSpec }—

Defined in packages/pivot-studio/src/types.ts:184

PivotReportOptionsinterface#

interface PivotReportOptions
PropertyTypeDescription
layoutoptionalPivotLayoutName—
grandTotalRowoptionalboolean—
grandTotalColumnoptionalboolean—
rowSubtotalsoptionalboolean—
columnSubtotalsoptionalboolean—
grandTotalPositionoptional'top' | 'bottom'—
subtotalPositionoptional'top' | 'bottom'—
stackedHeadersoptionalboolean—
repeatRowLabelsoptionalboolean—
emptyCellTextoptionalstring—

Defined in packages/pivot-studio/src/types.ts:159

PivotSliceinterface#

interface PivotSlice
PropertyTypeDescription
rowsoptionalSliceField[]—
columnsoptionalSliceField[]—
valuesoptionalValueField[]—
filtersoptionalSliceField[]—

Defined in packages/pivot-studio/src/types.ts:87

PivotStudioApiinterface#

interface PivotStudioApi<TRecord = PivotRecord> extends Widget< PivotStudioOptions<TRecord>, PivotStudioEvents<TRecord> >
MemberTypeDescription
setData()(data: readonly TRecord[] | string, options?: SetDataOptions) => void—
getRecords()() => readonly TRecord[]—
getFields()() => PivotField[]—
getMembers()(field: string) => PivotMember[]—
setReport()(report: PivotReport) => void—
getReport()() => PivotReport—
addField()(zone: PivotZone, field: string, index?: number) => void—
removeField()(field: string, zone?: PivotZone) => void—
moveField()(field: string, zone: Exclude<PivotZone, 'values'>, index?: number) => void—
setAggregation()(measure: string, aggregation: AggregationName) => void—
setShowValuesAs()(measure: string, showAs: ShowValuesAs, along?: PivotAxis) => void—
setFilter()(field: string, filter: FieldFilter | null) => void—
setSort()(field: string, sort: SortDirection | MeasureSort) => void—
swapAxes()() => void—
expandAll()(axis?: PivotAxis) => void—
collapseAll()(axis?: PivotAxis) => void—
setExpanded()(axis: PivotAxis, path: readonly string[], expanded: boolean) => void—
drillThrough()(rowPath: readonly string[], colPath?: readonly string[]) => TRecord[]—
getView()() => PivotView | null—
getPivotMatrix()(options?: PivotMatrixOptions) => PivotMatrixCell[][]—
exportCsv()(options?: CsvExportOptions) => string—
exportExcel()(options?: ExcelExportOptions) => Promise<Uint8Array>—
refresh()() => Promise<void>—
elementreadonlyHTMLElementInherited from Widget.
update()(options: Partial<PivotStudioOptions<TRecord>>) => voidInherited from Widget.
on()<K extends keyof TEvents & string>(event: K, listener: Listener<TEvents[K]>) => () => voidInherited from Widget.
destroy()() => voidInherited from Widget.

Defined in packages/pivot-studio/src/types.ts:385

PivotStudioEventsinterface#

interface PivotStudioEvents<TRecord = PivotRecord>
PropertyTypeDescription
ready{ api: PivotStudioApi<TRecord> }—
reportChange{ report: PivotReport }—
cellClickCellClickEvent—
drillThroughDrillThroughEvent<TRecord>—
dataLoaded{ rowCount: number; fields: PivotField[] }—
pivotUpdated{ rowCount: number; columnCount: number; recordCount: number; durationMs: number }—
error{ message: string; error?: unknown }—

Defined in packages/pivot-studio/src/types.ts:314

PivotStudioOptionsinterface#

interface PivotStudioOptions<TRecord = PivotRecord>
PropertyTypeDescription
dataoptionalreadonly TRecord[] | string—
dataFormatoptionalDataFormat—
csvDelimiteroptionalstring—
dataLimitsoptionalPartial<DataLimits>—
fieldsoptionalFieldDefinition[]—
reportoptionalPivotReport—
licenseKeyoptionalstring—
themeoptional'light' | 'dark' | 'auto'—
densityoptional'compact' | 'normal' | 'comfortable'—
localeoptionalstring—
heightoptionalnumber | string—
fieldListoptionalboolean—
toolbaroptionalboolean—
workeroptionalboolean—
drillThroughoptionalboolean—
injectStylesoptionalboolean—
ariaLabeloptionalstring—
fileNameoptionalstring—
pluginsoptionalPivotStudioPlugin[]—
localeTextoptionalLocaleTextInput—
rtloptionalboolean—

Defined in packages/pivot-studio/src/types.ts:354

PivotStudioPlugininterface#

interface PivotStudioPlugin
PropertyTypeDescription
namereadonlystring—
install()(context: PivotStudioPluginContext<unknown>) => void | (() => void)—

Defined in packages/pivot-studio/src/types.ts:349

PivotStudioPluginContextinterface#

interface PivotStudioPluginContext<TRecord = PivotRecord>
PropertyTypeDescription
studioreadonlyPivotStudioApi<TRecord>—
rootreadonlyHTMLElement—
licenseKeyreadonlystring | undefined—
themereadonly'light' | 'dark' | 'auto'—
addToolbarButton()(button: PivotToolbarButton) => PivotToolbarHandle—
addPanel()(position: 'top' | 'bottom') => HTMLElement—
announce()(message: string) => void—
translateTranslate—

Defined in packages/pivot-studio/src/types.ts:338

PivotToolbarButtoninterface#

interface PivotToolbarButton
PropertyTypeDescription
idstring—
labelstring—
titleoptionalstring—
toggleoptionalboolean—
onClick()() => void—

Defined in packages/pivot-studio/src/types.ts:324

PivotToolbarHandleinterface#

interface PivotToolbarHandle
PropertyTypeDescription
elementreadonlyHTMLButtonElement—
setPressed()(pressed: boolean) => void—
remove()() => void—

Defined in packages/pivot-studio/src/types.ts:332

PivotViewinterface#

interface PivotView
PropertyTypeDescription
layoutreadonlyPivotLayoutName—
rowFieldsreadonlyreadonly PivotField[]—
columnFieldsreadonlyreadonly PivotField[]—
measuresreadonlyreadonly PivotMeasureInfo[]—
rowsreadonlyreadonly PivotViewRow[]—
columnsreadonlyreadonly PivotViewColumn[]—
rowHeaderColumnsreadonlyreadonly string[]—
headerLevelsreadonlynumber—
headerSpansreadonlyreadonly (readonly PivotHeaderSpan[])[]—
recordCountreadonlynumber—
totalRecordCountreadonlynumber—
value()(rowIndex: number, columnIndex: number) => number | null—
rawValue()(rowIndex: number, columnIndex: number) => number | null—
formatted()(rowIndex: number, columnIndex: number) => string—
cellStyle()(rowIndex: number, columnIndex: number) => CellStyle | null—
excelFormat()(columnIndex: number) => string—
columnKind()(columnIndex: number) => 'number' | 'integer' | 'percent' | 'date'—

Defined in packages/pivot-studio/src/types.ts:258

PivotViewColumninterface#

interface PivotViewColumn
PropertyTypeDescription
idreadonlystring—
kindreadonlyPivotRowKind—
nodereadonlynumber—
depthreadonlynumber—
pathreadonlyreadonly string[]—
labelsreadonlyreadonly string[]—
headerPathreadonlyreadonly string[]—
headerreadonlystring—
measureIndexreadonlynumber—
expandablereadonlyboolean—
expandedreadonlyboolean—

Defined in packages/pivot-studio/src/types.ts:227

PivotViewRowinterface#

interface PivotViewRow
PropertyTypeDescription
idreadonlystring—
kindreadonlyPivotRowKind—
nodereadonlynumber—
depthreadonlynumber—
pathreadonlyreadonly string[]—
labelsreadonlyreadonly string[]—
labelreadonlystring—
expandablereadonlyboolean—
expandedreadonlyboolean—
hasValuesreadonlyboolean—
cellsreadonlyreadonly string[]—
ownersreadonlyreadonly number[]—

Defined in packages/pivot-studio/src/types.ts:212

PivotWorkbookOptionsinterface#

interface PivotWorkbookOptions
PropertyTypeDescription
sheetNameoptionalstring—
titleoptionalstring—
creatoroptionalstring—
isCollapsedoptional(path: readonly string[]) => boolean—
summaryBelowoptionalboolean—

Defined in packages/pivot-studio/src/engine/workbook.ts:7

SetDataOptionsinterface#

interface SetDataOptions
PropertyTypeDescription
formatoptionalDataFormat—
delimiteroptionalstring—
limitsoptionalPartial<DataLimits>—
fieldsoptionalFieldDefinition[]—

Defined in packages/pivot-studio/src/types.ts:378

SliceFieldinterface#

interface SliceField
PropertyTypeDescription
fieldstring—
sortoptionalSortDirection—
sortByoptionalMeasureSort—

Defined in packages/pivot-studio/src/types.ts:71

ThresholdRuleinterface#

interface ThresholdRule extends ConditionalFormatBase
PropertyTypeDescription
type'threshold'—
opValueFilterOp—
valuenumber—
valueTooptionalnumber—
backgroundoptionalstring—
coloroptionalstring—
boldoptionalboolean—
classNameoptionalstring—
idoptionalstring | undefinedInherited from ConditionalFormatBase.
measureoptionalstring | undefinedInherited from ConditionalFormatBase.
includeTotalsoptionalboolean | undefinedInherited from ConditionalFormatBase.

Defined in packages/pivot-studio/src/types.ts:146

TopFilterinterface#

interface TopFilter
PropertyTypeDescription
type'top' | 'bottom'—
countnumber—
measureMeasureRef—

Defined in packages/pivot-studio/src/types.ts:113

ValueFieldinterface#

interface ValueField
PropertyTypeDescription
fieldstring—
aggregationoptionalAggregationName—
showAsoptionalShowValuesAs—
alongoptionalPivotAxis—
captionoptionalstring—
formatoptionalPivotNumberFormat—
idoptionalstring—

Defined in packages/pivot-studio/src/types.ts:77

ValueFilterinterface#

interface ValueFilter
PropertyTypeDescription
opValueFilterOp—
measureMeasureRef—
valuenumber—
valueTooptionalnumber—

Defined in packages/pivot-studio/src/types.ts:106

AggregationNametype#

type AggregationName = 'sum' | 'count' | 'avg' | 'min' | 'max' | 'distinctCount' | 'median';

Defined in packages/pivot-studio/src/types.ts:10

ConditionalFormatRuletype#

type ConditionalFormatRule = ColorScaleRule | DataBarRule | ThresholdRule;

Defined in packages/pivot-studio/src/types.ts:157

DataFormattype#

type DataFormat = 'auto' | 'array' | 'csv' | 'json';

Defined in packages/pivot-studio/src/types.ts:31

DateParttype#

type DatePart = 'year' | 'quarter' | 'month' | 'day';

Defined in packages/pivot-studio/src/types.ts:8

FieldTypetype#

type FieldType = 'string' | 'number' | 'date' | 'boolean';

Defined in packages/pivot-studio/src/types.ts:6

InputLimitCodetype#

type InputLimitCode =
  'input-too-long' | 'too-many-rows' | 'too-many-columns' | 'too-many-events' | 'too-many-tasks' | 'too-many-links';

Defined in packages/core/src/input-limits.ts:1

LabelFilterOptype#

type LabelFilterOp = 'contains' | 'notContains' | 'beginsWith' | 'endsWith' | 'equals' | 'notEquals';

Defined in packages/pivot-studio/src/types.ts:94

MeasureReftype#

type MeasureRef = string | { field: string; aggregation?: AggregationName };

Defined in packages/pivot-studio/src/types.ts:98

PivotAxistype#

type PivotAxis = 'rows' | 'columns';

Defined in packages/pivot-studio/src/types.ts:23

PivotLayoutNametype#

type PivotLayoutName = 'compact' | 'outline' | 'tabular';

Defined in packages/pivot-studio/src/types.ts:27

PivotMatrixCelltype#

type PivotMatrixCell = string | number | null;

Defined in packages/pivot-studio/src/types.ts:283

PivotRecordtype#

type PivotRecord = Record<string, unknown>;

Defined in packages/pivot-studio/src/types.ts:4

PivotRowKindtype#

type PivotRowKind = 'member' | 'subtotal' | 'grandTotal';

Defined in packages/pivot-studio/src/types.ts:210

PivotZonetype#

type PivotZone = 'rows' | 'columns' | 'values' | 'filters';

Defined in packages/pivot-studio/src/types.ts:25

ShowValuesAstype#

type ShowValuesAs =
  | 'none'
  | 'percentOfGrandTotal'
  | 'percentOfRowTotal'
  | 'percentOfColumnTotal'
  | 'percentOfParentRowTotal'
  | 'percentOfParentColumnTotal'
  | 'runningTotal'
  | 'differenceFromPrevious'
  | 'percentDifferenceFromPrevious';

Defined in packages/pivot-studio/src/types.ts:12

SortDirectiontype#

type SortDirection = 'asc' | 'desc';

Defined in packages/pivot-studio/src/types.ts:29

ValueFilterOptype#

type ValueFilterOp = 'gt' | 'gte' | 'lt' | 'lte' | 'eq' | 'ne' | 'between' | 'notBetween';

Defined in packages/pivot-studio/src/types.ts:96

@birchui/pivot-studio/charts#

createPivotChartfunction#

function createPivotChart<TRecord>(container: HTMLElement, studio: PivotStudioApi<TRecord>, options: PivotChartOptions = {}): PivotChartHandle
ParameterTypeDescription
containerHTMLElement—
studioPivotStudioApi<TRecord>—
optionsoptionalPivotChartOptions—

Defined in packages/pivot-studio/src/charts.ts:66

pivotChartDatafunction#

function pivotChartData(view: PivotView, options: PivotChartDataOptions = {}): PivotChartData
ParameterTypeDescription
viewPivotView—
optionsoptionalPivotChartDataOptions—

Defined in packages/pivot-studio/src/engine/chart-data.ts:21

pivotChartOptionsfunction#

function pivotChartOptions(view: PivotView | null, options: PivotChartOptions = {}): ChartOptions<ChartDatum>
ParameterTypeDescription
viewPivotView | null—
optionsoptionalPivotChartOptions—

Defined in packages/pivot-studio/src/charts.ts:30

pivotChartPluginfunction#

function pivotChartPlugin(options: PivotChartPluginOptions = {}): PivotStudioPlugin
ParameterTypeDescription
optionsoptionalPivotChartPluginOptions—

Defined in packages/pivot-studio/src/charts.ts:93

PivotChartDatainterface#

interface PivotChartData
PropertyTypeDescription
categoriesstring[]—
seriesPivotChartSeries[]—

Defined in packages/pivot-studio/src/engine/chart-data.ts:10

PivotChartHandleinterface#

interface PivotChartHandle
PropertyTypeDescription
chartreadonlyChartApi<ChartDatum>—
update()(options: Partial<PivotChartOptions>) => void—
refresh()() => void—
destroy()() => void—

Defined in packages/pivot-studio/src/charts.ts:18

PivotChartOptionsinterface#

interface PivotChartOptions extends PivotChartDataOptions
PropertyTypeDescription
typeoptionalPivotChartType—
stackedoptionalboolean—
titleoptionalstring—
heightoptionalnumber | string—
themeoptional'light' | 'dark' | 'auto'—
licenseKeyoptionalstring—
localeoptionalstring—
chartoptionalPartial<Omit<ChartOptions<ChartDatum>, 'data' | 'series'>>—
measureoptionalstring | undefinedInherited from PivotChartDataOptions.
maxCategoriesoptionalnumber | undefinedInherited from PivotChartDataOptions.
maxSeriesoptionalnumber | undefinedInherited from PivotChartDataOptions.

Defined in packages/pivot-studio/src/charts.ts:7

PivotChartPluginOptionsinterface#

interface PivotChartPluginOptions extends PivotChartOptions
PropertyTypeDescription
positionoptional'top' | 'bottom'—
visibleoptionalboolean—
typeoptionalPivotChartType | undefinedInherited from PivotChartOptions.
stackedoptionalboolean | undefinedInherited from PivotChartOptions.
titleoptionalstring | undefinedInherited from PivotChartOptions.
heightoptionalstring | number | undefinedInherited from PivotChartOptions.
themeoptional"auto" | "light" | "dark" | undefinedInherited from PivotChartOptions.
licenseKeyoptionalstring | undefinedInherited from PivotChartOptions.
localeoptionalstring | undefinedInherited from PivotChartOptions.
chartoptionalPartial<Omit<ChartOptions<ChartDatum>, "data" | "series">> | undefinedInherited from PivotChartOptions.
measureoptionalstring | undefinedInherited from PivotChartDataOptions.
maxCategoriesoptionalnumber | undefinedInherited from PivotChartDataOptions.
maxSeriesoptionalnumber | undefinedInherited from PivotChartDataOptions.

Defined in packages/pivot-studio/src/charts.ts:25

PivotChartSeriesinterface#

interface PivotChartSeries
PropertyTypeDescription
idstring—
namestring—
measurestring—
values(number | null)[]—

Defined in packages/pivot-studio/src/engine/chart-data.ts:3

PivotChartTypetype#

type PivotChartType = 'column' | 'bar' | 'line' | 'area' | 'pie' | 'donut';

Defined in packages/pivot-studio/src/charts.ts:5

↑ ↓ to move, Enter to open, Esc to close