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
arpost
Post Prodigy
Post Prodigy

Is it possible to add context menu option for buttons and shapes in PBI Embedded?

I am wanting to add a special menu option to buttons/shapes in an Embedded report via API, but it appears that Context Menu options don't show up for buttons. I've added a new commmand, which shows up just fine for standard visuals but no joy with buttons:

arpost_0-1650311862734.png

 

I'm using the PBI Embeded Playground to test out the API and cannot figure this out. Here's some of the relevant code for the playground:

 

const newSettings = {
    extensions: [
        {
            command: {
                name: "extension command",
                title: "Extend command",
                extend: {
                    // Define visualContextMenu to extend context menu.
                    visualContextMenu: {
                        // Define title to override default title.
                        //You can override default icon as well.
                        title: "Extend context menu",
                        menuLocation: models.MenuLocation.Top

                    }
                }
            }
        }
    ]
};

// Update the settings by passing in the new settings you have configured.
try {
    await report.updateSettings(newSettings);
}
catch (error) {
    console.log(error);
}

// report.off removes all event handlers for a specific event
report.off("commandTriggered");

// report.on will add an event handler to commandTriggered event which prints to console window.
report.on("commandTriggered", function (event) {
    let commandDetails = event.detail;
    console.log("Event - commandTriggered:\n", commandDetails);
});

 

 

1 ACCEPTED SOLUTION
v-chenwuz-msft
Community Support
Community Support

Hi @arpost ,

 

It seems no such a object for extending context menu on button/shape. You can submit your ideas on Power BI Ideas website.

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

1 REPLY 1
v-chenwuz-msft
Community Support
Community Support

Hi @arpost ,

 

It seems no such a object for extending context menu on button/shape. You can submit your ideas on Power BI Ideas website.

 

Best Regards

Community Support Team _ chenwu zhu

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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