@kanunilabs/datagrid-enterprise
@kanunilabs/datagrid-enterprise / ChartPanelHandle
Interface: ChartPanelHandle
GridChartApi (open / close / toggle / isOpen / getState / setState) plus
dispose. The panel keeps its chart in the grid's saved view as well, so
getViewState() and stateStoring carry it with no code of the app's.
Extends
GridChartApi
Methods
close()
close():
void
Returns
void
Inherited from
GridChartApi.close
dispose()
dispose():
void
Returns
void
download()
download(
options?):Promise<boolean>
Download the chart — what the panel's buttons do, in the format and size
you ask for. false when there is nothing to export.
Parameters
options?
ChartImageRequest
Returns
Promise<boolean>
Inherited from
GridChartApi.download
getImageDataUrl()
getImageDataUrl(
options?):Promise<string|null>
The chart as an image data: URL — PNG unless format says 'jpeg' or
'svg', with its title. null while the panel is closed or has nothing
drawn.
Parameters
options?
ChartImageRequest
Returns
Promise<string | null>
Inherited from
GridChartApi.getImageDataUrl
getState()
getState():
GridChartState
A JSON-safe snapshot, including whether the panel is open.
Returns
GridChartState
Inherited from
GridChartApi.getState
getWindows()
getWindows():
GridChartWindow[]
The extra windows open now, oldest first.
Returns
GridChartWindow[]
Inherited from
GridChartApi.getWindows
isOpen()
isOpen():
boolean
Returns
boolean
Inherited from
GridChartApi.isOpen
open()
open(
seed?):void
Show the panel; on an open panel, apply the seed to the chart already there.
Parameters
seed?
Partial<Omit<GridChartState, "version" | "open">>
Returns
void
Inherited from
GridChartApi.open
openWindow()
openWindow(
seed?):GridChartWindow
Open another chart in a window of its own, floating over the grid — what the panel's "New window" button does. It starts as a copy of the panel's chart with the seed applied; from then on the two are independent.
Parameters
seed?
Partial<Omit<GridChartState, "version" | "open">>
Returns
GridChartWindow
Inherited from
GridChartApi.openWindow
setState()
setState(
state):void
Restore a snapshot from getState. Columns the grid no longer has are
dropped (their series, or the category, fall back to a default); a
snapshot of another version is ignored.
Parameters
state
GridChartState
Returns
void
Inherited from
GridChartApi.setState
toggle()
toggle():
void
Returns
void
Inherited from
GridChartApi.toggle