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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
n0gare
Frequent Visitor

How to add a Context menu

Hello guys,

 

I am looking for a way to add a context menu to my visual. Currently my visuals display a graph with nodes and edges. My visual is based on the Force-Directed Graph.

I want a context menu to show up after the user "right clicks" on a node, in that context menu the user is able to select some other functions.

Let's say my current graph represents a group of animals, so when "right clicking" on an elephant-node for example, a context menu shows up in that the user can enter the wikipedia site of an elephant to get more information, or some other function.

I thought to change the tooltip, but maybe there is a better way to do it. And I am not sure if the user is able to interact with the tooltip.

 

I hope you understand what my goal is.

 

Best regards!

 

7 REPLIES 7
djnww
Impactful Individual
Impactful Individual

Hi. At this point in time, the only solution I can think off is to have a separate table that will display your extra content (ie. URL) when a node is selected. FYI, I am assuming that clicking on a node will act as a filter for other visual charts on the page.

Dan
n0gare
Frequent Visitor

Hi,

 

That's a good idea. 

I will try this out. 

Thank you !

 

Best regards

n0gare
Frequent Visitor

Hey,

 

Unfortunately this soulution is not working the way I wanted.

Does anyone know if it is even possible to add contextmenus into a power bi visual?

I worked with some tutorials that explain contextmenus for regular javascript, but none of them is working.

I hope you guys can help me .

 

Best regards!

djnww
Impactful Individual
Impactful Individual

Hi @n0gare,

 

Can you clearly describe what you are trying to achieve ?

Let's assume that you have a stacked bar chart for Product Sales as per the image below. What do you want the chart to do ?

 

Capture.JPG

n0gare
Frequent Visitor

Hi djnww,

 

Let's assume chairs, coffee and books are our products, that we visualize.

So by the look at the visual the user gets a rough overview about the products. but to get further, more specific information, the user can open a contextmenu (with a right click on the object) with links/url to the web.

The link/url for each product would be provided form the (Excel) table, that is used to create the visualization.

As I was looking for help, I found some examples of how I want it to look like. But the approach that was used there is not working. 

To add a context menu like in the image below, would be great.

 

Best regards!

ContextMenuExample.PNG

@n0gare,

 

To add such a new feature to a custom visual, you may submit an idea or leave a comment at GitHub.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hey Sam,

 

I tried to add a ContextMenu for quite some time and the only thing I was able to do is to add the basic html contextMenu. The funny thing is that it only worked in a web browser.

Well anyway thank you for your suggestions, I am currentyl thinking about my next step.

 

Best reagards 

n0gare

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.