Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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:
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);
});
Solved! Go to Solution.
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.
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.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
6 | |
6 | |
3 | |
2 | |
2 |
User | Count |
---|---|
6 | |
5 | |
4 | |
4 | |
3 |