Forum Discussion
Adding custom visual without data mapping
- 4 months ago"supportsEmptyDataView": true,"dataRoles": [],"dataViewMappings": [],"supportsLandingPage": true,
these settings worked for me
Hi jananigurusamy ,
This behavior is typical for Power BI custom visuals. The lifecycle of the visual is managed through data binding, meaning it is fully initialized only when Power BI provides a DataView. If no fields are mapped, Power BI does not deliver a DataView, resulting in the update method either not being triggered or receiving no usable data. Consequently, nothing is rendered, even if your React component does not require data.
When a field such as Quantity is mapped, Power BI generates a DataView and calls the update method with valid data, which enables the visual to be displayed. While it might appear that the visual relies on the field, it actually serves as the trigger for rendering.
To resolve this, it is recommended to configure your visual to support empty data views within the capabilities settings. This approach ensures Power BI invokes the visual even when no fields are mapped. Additionally, your update logic should account for the possibility that dataViews may not always contain data, and your React component should render regardless of data presence. Some developers implement a minimal or dummy data role to guarantee consistent triggering, but the primary goal is to make the visual robust when handling an empty DataView.
By applying these modifications, your chatbot visual will render reliably without requiring users to map fields.
Thank you.
Hi jananigurusamy ,
I wanted to follow up and see if you had a chance to review the information shared. If you have any further questions or need additional assistance, feel free to reach out.
Thank you.
- v-tejrama4 months agoCommunity Support
Hi jananigurusamy ,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.
Thank you.