This is best Fabric, Power BI, SQL and AI community event. How do we know? The last event sold out! Save €200 with code FABCMTY200.
Register nowA new Data Days event is coming soon! This time we’re going bigger than ever. Fabric, Power BI, SQL, AI and more. Don't miss out.
i have created a histogram custom visual to show summary statistics . but i can not add interaction to the visual .
this is my visual.ts code
can any one help me out . i will share my dataview also
thank you for your replay
when i debuging my visual my visual.ts file not receving my dataview. why it is so
Hi @Anonymous ,
Adding interactions to custom visual objects requires interaction permissions.
Start by defining a variable via options.host.hostCapabilities.allowInteractions as whether or not interaction permissions are allowed.
Try code like below:
...
let allowInteractions = options.host.hostCapabilities.allowInteractions;
bars.on('click', function(d) {
if (allowInteractions) {
selectionManager.select(d.selectionId);
...
}
});
For the ts file you provide, you can interact with the visual object in two ways, by selecting and filtering.
For more details, you can refer to below document:
Visual interactions in Power BI visuals - Power BI | Microsoft Learn
Power BI visual data point selections - Power BI | Microsoft Learn
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Sign up to receive a private message when registration opens and key events begin.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
| User | Count |
|---|---|
| 3 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |