# Class WidgetById Fusion Embed
The WidgetById component, which is a thin wrapper on the ChartWidget component,
used to render a widget created in the Sisense instance.
Note: Widget extensions based on JS scripts and add-ons in Fusion are not supported.
# Example
Here's how you can use the WidgetById component in a Vue application:
<template>
<WidgetById
widgetOid="64473e07dac1920034bce77f"
dashboardOid="6441e728dac1920034bce737"
/>
</template>
<script setup lang="ts">
import { ref } from 'vue';
import { WidgetById } from '@sisense/sdk-ui-vue';
</script>
# Properties
# Data
# filters
readonlyfilters?:Filter[]
Filters that will slice query results
Provided filters will be merged with the existing filters from the widget configuration.
# filtersMergeStrategy
readonlyfiltersMergeStrategy?:"codeFirst"|"codeOnly"|"widgetFirst"
Strategy for merging the existing widget filters (including highlights) with the filters provided via the filters and highlights props:
widgetFirst- prioritizes the widget filters over the provided filters in case of filter conflicts by certain attributes.codeFirst- prioritizes the provided filters over the widget filters in case of filter conflicts by certain attributes.codeOnly- applies only the provided filters and completely ignores the widget filters.
If not specified, the default strategy is codeFirst.
# highlights
readonlyhighlights?:Filter[]
Highlight filters that will highlight results that pass filter criteria
# includeDashboardFilters
readonlyincludeDashboardFilters?:boolean
Boolean flag whether to include dashboard filters in the widget's filters and highlights
If not specified, the default value is false.
# Widget
# dashboardOid
readonlydashboardOid:string
Identifier of the dashboard that contains the widget
# description
readonlydescription?:string
Description of the widget
If not specified, it takes the existing value from the widget configuration.
# highlightSelectionDisabled
readonlyhighlightSelectionDisabled?:boolean
Boolean flag whether selecting data points triggers highlight filter of the selected data
Recommended to turn on when the Chart Widget component is enhanced with data drilldown by the Drilldown Widget component
If not specified, the default value is false
# styleOptions
readonlystyleOptions?:WidgetByIdStyleOptions
Style options for the widget including the widget container and the chart or table inside.
# title
readonlytitle?:string
Title of the widget
If not specified, it takes the existing value from the widget configuration.
# widgetOid
readonlywidgetOid:string
Identifier of the widget
# Callbacks
# onBeforeRender
readonlyonBeforeRender?:BeforeRenderHandler|IndicatorBeforeRenderHandler
A callback that allows you to customize the underlying chart element before it is rendered. The returned options are then used when rendering the chart.
This callback is not supported for Areamap Chart, Scattermap Chart, Table, and PivotTable.
# onDataPointClick
readonlyonDataPointClick?:AreamapDataPointEventHandler|BoxplotDataPointEventHandler|CalendarHeatmapDataPointEventHandler|DataPointEventHandler|IndicatorDataPointEventHandler|ScatterDataPointEventHandler|ScattermapDataPointEventHandler
Click handler callback for a data point
# onDataPointContextMenu
readonlyonDataPointContextMenu?:BoxplotDataPointEventHandler|CalendarHeatmapDataPointEventHandler|DataPointEventHandler|ScatterDataPointEventHandler
Context menu handler callback for a data point
# onDataPointsSelected
readonlyonDataPointsSelected?:CalendarHeatmapDataPointsEventHandler|DataPointsEventHandler|ScatterDataPointsEventHandler
Handler callback for selection of multiple data points
# onDataReady
readonlyonDataReady?: (data) =>Data
A callback that allows to modify data immediately after it has been retrieved. Can be used to inject modification of queried data.
# Parameters
| Parameter | Type |
|---|---|
data | Data |