Type alias WidgetConfig
WidgetConfig:
object
Configuration of the widget.
Type declaration
actions
actions?: object
Configuration for actions available on the widget, such as downloading the widget's data.
actions.downloadCsvdownloadCsv?:
objectConfiguration for the "Download as CSV" action, which adds an item to the widget's header menu that exports the widget's underlying data as a CSV file.
Example
Enable CSV download for a widget:
const widgetConfig: WidgetConfig = { actions: { downloadCsv: { enabled: true, }, }, };
downloadCsv.enabledenabled?:
booleanWhether the "Download as CSV" action is enabled for the widget.
Default
false
actions.downloadExceldownloadExcel?:
objectConfiguration for the "Download as Excel" action, which adds an item to the widget's header menu that exports the widget's underlying data as an Excel (XLSX) file.
Example
Enable Excel download for a widget:
const widgetConfig: WidgetConfig = { actions: { downloadExcel: { enabled: true, }, }, };
downloadExcel.enabledenabled?:
booleanWhether the "Download as Excel" action is enabled for the widget.
Note: the widget's
idis required for Excel export to work, as it is used to build the export request. Without it, the export fails.Default
false
narrative
narrative?: WidgetNarrativeConfig
Configuration for widget narrative.