set_legend
Adjust a chart legend's visibility and placement in Power BI. Show or hide it and choose a position like Top, Bottom, Left, Right, or TopCenter for a specific visual.
Instructions
Show/hide a chart legend and set its position (Top|Bottom|Left|Right|TopCenter|... ).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"reportSessionId": "<reportSessionId>",
"pageName": "<pageName>",
"visualName": "<visualName>"
},
"name": "set_legend"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| show | No | ||
| pageName | Yes | ||
| position | No | Top | |
| visualName | Yes | ||
| reportSessionId | Yes |