Documentation

@kanunilabs/pivotgrid-enterprise


@kanunilabs/pivotgrid-enterprise / EnterprisePivotGridApi

Interface: EnterprisePivotGridApi<TRow>

Extends

  • unknown<TRow>

Type Parameters

TRow

TRow = unknown

Methods

downloadChart()

downloadChart(options?): Promise<boolean>

Download the chart in the format and size you ask for; false when there is nothing to export.

Parameters

options?

ChartImageRequest

Returns

Promise<boolean>


getChartImageDataUrl()

getChartImageDataUrl(options?): Promise<string | null>

The chart as an image data: URL — PNG unless format says 'jpeg' or 'svg', at the size you ask for, with its title. null while the panel is closed or has nothing drawn.

Parameters

options?

ChartImageRequest

Returns

Promise<string | null>


getChartState()

getChartState(): PivotChartState | null

The chart as data — open, type, stacking, format and the series hidden in the legend (by series key). null without charts. Saved reports carry it too (parts.chart), and controller.on('chartChanged', …) reports it.

Returns

PivotChartState | null


getChartWindows()

getChartWindows(): PivotChartWindow[]

The extra chart windows open now, oldest first.

Returns

PivotChartWindow[]


isEnterpriseLicensed()

isEnterpriseLicensed(): boolean

Valid license, right now.

Returns

boolean


openCalculatedFieldDesigner()

openCalculatedFieldDesigner(fieldId?): void

Open the calculated-field designer — new field, or editing an existing calculated one by id. Needs calculatedFields (the default).

Parameters

fieldId?

string

Returns

void


openChartWindow()

openChartWindow(seed?): PivotChartWindow | null

Open another chart of the same pivot in a window of its own, floating over the grid — what the panel's "New window" does. It starts as a copy of the panel's chart with the seed applied (a floating rectangle places it exactly). Needs charts.

Parameters

seed?

Partial<PivotChartState>

Returns

PivotChartWindow | null


openDrillDown()

openDrillDown(spec): void

Open the drill-down modal over an explicit record set — the manual route, available whether or not drillDown wired the cell click.

Parameters

spec
colPath?

readonly string[]

fileName?

string

pageSize?

number

records

readonly Record<string, unknown>[]

rowPath?

readonly string[]

Returns

void


openPrefilterBuilder()

openPrefilterBuilder(): void

Open the prefilter builder. Needs prefilter (the default).

Returns

void


setChartFormat()

setChartFormat(format): void

Replace the chart's title, axis titles, legend position and data labels. Needs charts.

Parameters

format

ChartFormat

Returns

void


setChartStacking()

setChartStacking(stacking): void

Switch the series layout: grouped, stacked or 100% stacked. Needs charts.

Parameters

stacking

ChartStacking

Returns

void


setChartState()

setChartState(state): void

Restore getChartState's snapshot. Needs charts.

Parameters

state

PivotChartState

Returns

void


setChartType()

setChartType(type): void

Switch chart type. Needs charts.

Parameters

type

PivotChartType

Returns

void


toggleChart()

toggleChart(): void

Show or hide the chart panel. Needs charts (the default).

Returns

void