Documentation

@kanunilabs/pivotgrid-enterprise


@kanunilabs/pivotgrid-enterprise / ChartPanelSpec

Interface: ChartPanelSpec

Properties

colors?

optional colors?: "theme" | "fixed" | readonly string[]

Series colours: 'theme' derives them from the grid's --pivot-primary (the DataGrid's ramp — series one IS the accent), a list uses it in order, 'fixed' (default) keeps the colours the transformer gave.


getFields?

optional getFields?: () => readonly PivotField<any, PivotCellTemplate, any>[]

The grid's fields, read when a value is printed — a series' measure brings its format.

Returns

readonly PivotField<any, PivotCellTemplate, any>[]


getI18n

getI18n: () => ResolvedI18n

Returns

ResolvedI18n


gridRoot

gridRoot: HTMLElement

The grid root; the panel mounts into its flex column.


height?

optional height?: number


initialFloating?

optional initialFloating?: boolean | FrameRect

Open as a window floating over the grid instead of docked above it — true for a centred window, or a rectangle (px, relative to the grid). The panel's own button moves it between the two either way (§E.1 #9).


initialFormat?

optional initialFormat?: ChartFormat

Title, axis titles, legend position and data labels to open with.


initialStacking?

optional initialStacking?: ChartStacking

Series layout for column, bar, line and area. Default 'grouped'.


initialType?

optional initialType?: PivotChartType


onCategoryClick?

optional onCategoryClick?: (category) => void

A click on a category's mark (bar, slice, point, cell). Without it the marks are not clickable; the wrapper's chartCrossFilter sets it.

Parameters

category

PivotChartCategory

Returns

void


onClearCrossFilter?

optional onClearCrossFilter?: () => void

The Clear button of the cross-filter note.

Returns

void


onFormatChange?

optional onFormatChange?: (format) => void

Reports each change the reader makes in the Format editor (plain data, keep it).

Parameters

format

ChartFormat

Returns

void


onStateChange?

optional onStateChange?: (state, chartId?) => void

The panel as data after every change, open and close included — the wrapper hands it to controller.reportChartState, which turns it into the chart events. An extra chart window reports with its id.

Parameters

state

PivotChartState

chartId?

string

Returns

void


onTypeChange?

optional onTypeChange?: (type) => void

Parameters

type

PivotChartType

Returns

void


portal?

optional portal?: any

Fullscreen host, when the wrapper offers one.


role?

optional role?: ChartWindowRole

Set when this panel is one of the grid's extra windows (internal, §E.1 #10).