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

<script setup lang="ts">
import { widgetModelTranslator, useGetWidgetModel } from '@sisense/sdk-ui-vue';
import { computed } from 'vue';

const { data: widgetModel } = useGetWidgetModel({
 dashboardOid: 'your-dashboard-oid',
 widgetOid: 'your-widget-oid',
});

const textWidgetProps = computed(() =>
 widgetModel.value ? widgetModelTranslator.toTextWidgetProps(widgetModel.value) : null,
);
</script>

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

Last Updated: