⚠️ You are viewing documentation for an older version of Compose SDK.
Version:
# Function toTextWidgetProps
toTextWidgetProps(
widgetModel):TextWidgetProps
Translates a WidgetModel to the props for rendering a text widget.
# Parameters
| Parameter | Type |
|---|---|
widgetModel | WidgetModel |
# Returns
# 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.