Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Interactivity Service and Selection Manager in Custom Visuals

What is the role/function of the Interactivity Service and the Selection Manager?  Do they provide different roles or is there overlap.   Is there an example that uses both together?  Or does one supercede the other?

 

I've implemented the Interactivity Service following the sunburst example in my custom visual.  But now I need to get drill down working and I'm not sure if I need to implement the Selection Manager to handle that.  Is there a good example for demonstrating drill down in code?  I'm working with a matrix data view model.

 

Thanks for any and all responses.

2 REPLIES 2
dm-p
Super User
Super User

Hi @Anonymous,

My understanding of these is that:

  • The Selection Manager is used to generate Selection IDs.
  • The Interactivity Service requires Selection IDs to correctly identify how to interact with data within/between visuals when highlighting and cross-filtering.

Selection IDs are also used by the report page (canvas) tooltips to correctly identify when to display those vs. a standard tooltip. There was a thread the other day that has an example to illustrate.

I haven't come across any specific examples online, except for these videos on Jorge's YouTube channel, which help illustate the in the context of the sample bar chart, which uses a categorical data mapping. These videos are a couple of years old but the premise still holds-up today.:

Selection ID support for matrix and table dataViewMappings is pretty new, and they aren't too well covered at present in terms of examples.

The Context Menu API is also a relatively new addition and the linked page/sample bar chart is the only example I've seen to date. I haven't personally had a chance to play with it but this is how you'd conceptually manage Drillthrough - I see the example does refer to a Selection ID.

If you're after drilldown vs. drillthrough, then there's a short intro here, but this only refers to enabling it in your visual. I've only done as much as this when setting up a visual and haven't looked into drill-down by clicking on a node for example.

I'm not sure if this resolves your question but I hope that it gives you some ideas, at least 🙂

Good luck!

Daniel





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


My course: Introduction to Developing Power BI Visuals


On how to ask a technical question, if you really want an answer (courtesy of SQLBI)




Anonymous
Not applicable

Daniel, thanks for your reply.  A couple of the links provided some insight, but I'm not completely sure of my interpretation.  

 

I'm creating a custom grid visual using the matrix data model.  Another post suggested the Sunburst Visual as example for implementing the selection feature for a matrix model.  This used the InteractivitySelectionService and I've got that all working. 

 

I now want to incoorporate drill down (not drillthrough) into my grid.  I had added the properties to the capabilities file for drill through as described in that one link.  The expand hierarchy and drill level modes are working, and I had originally thought that when drill down mode was entered (clicked) and I make a selection to expand a particular data point, the selection feature would be overridden and power bi would get the descendants for the selected data point and return them on the call to Visual.update.  But that isn't happening, the selection feature's onclick is still called.   Is my idea of how drill down works correct?

 

The link to highlighting you provided describes that there are two mechanisms for implementing the selection feature, a lightweight (the SelectionManager) and then another more structured (would this be the InteractivitySelectionService?).  And that at this point, the link goes on to say, the selection Id objects are incompatible.  Any drill down example I've come across is using the SelectionManager and it also seems to be the only thing that will bring up a context menu.

 

I know drill down is possible in a matrix grid model. 

Do I have to implement the SelectionManager separately for drill down and coordinate it with the InteractivitySelectionService to get drill down to work?

Is there a way for the visual to know that we are in drill down mode versus basic selection mode?

Is there an example somewhere for implementing drill down in a grid matrix? 

 

Thanks again for any responses.

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.