sisense.com
✅ You are viewing documentation for the latest version of Compose SDK.
Version:

Function toTextWidgetProps

toTextWidgetProps(widgetModel): TextWidgetProps

Translates a WidgetModel to the props for rendering a text widget.

Parameters

ParameterType
widgetModelWidgetModel

Returns

TextWidgetProps

Example

const widgetModel = await widgetService.getWidgetModel({
 dashboardOid: 'your-dashboard-oid',
 widgetOid: 'your-widget-oid'
});
const textWidgetProps = widgetModelTranslator.toTextWidgetProps(widgetModel);

Note: this method is not supported for chart or pivot widgets. Use toChartWidgetProps instead for getting props for the ChartWidgetComponent. Use toPivotTableWidgetProps instead for getting props for the pivot table widget.

Last Updated: