Add Visual
add_visualAdd a visual to a Power BI report page by defining its type, mapped fields, position, and size, so you can build report layouts and data views in .pbip projects.
Instructions
Add a visual to a page. visual_type: card, slicer, donutChart, pieChart, filledMap, map, barChart / columnChart (stacked; "stackedBarChart" is accepted as an alias), clusteredBarChart, clusteredColumnChart, textbox, table, matrix. fields maps roles to fields, e.g. {"Y": "Tilaukset[Myynnin arvo]", "Category": "Kunnat[Kommun]", "Series": "Tilaukset[Tuoteryhmä]"}. Roles: card/slicer=Values; donut/pie=Category+Y; bar/column charts= Category+Series+Y; filledMap/map=Category(+Y/Size); textbox: options {"text": "..."}. x/y/width/height are pixels on a 1280x720 page. legend: "Top"|"Bottom"|"Left"|"Right". title: show header. options: extra PBIR objects merged into the visual.
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": {
"pbip_path": "<pbip_path>",
"page": "<page>",
"visual_type": "<visual_type>"
},
"name": "add_visual"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | ||
| y | No | ||
| name | No | ||
| page | Yes | ||
| title | No | ||
| width | No | ||
| fields | No | ||
| height | No | ||
| legend | No | ||
| options | No | ||
| pbip_path | Yes | ||
| visual_type | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||