pbi_set_visual_format_property
Set or reset formatting properties on Power BI visual objects (title, dataPoint, labels). Specify property values with type hints for accurate encoding, or reset properties to revert to default.
Instructions
Set / reset formatting properties on a visual's
singleVisual.objects[<object_name>][0].properties.
Parameters
extract_folder, page, visual_id, object_name:
Identify the target. object_name is the Power BI object key
('title', 'dataPoint', 'labels', 'background', 'general', etc.).
properties:
{property_name: value} to set. Values are encoded as Power BI
literals via the type hint in property_types.
property_types:
{property_name: type_hint}. Valid hints:
- ``auto`` (default) — infer from Python type
- ``bool`` — booleans
- ``int`` — integers (alias: ``integer``)
- ``decimal`` — floats / numerics (alias: ``float``, ``number``)
- ``text`` — strings (alias: ``string``)
- ``color`` — hex strings ``"#RRGGBB"`` (alias: ``fill``, ``hex``,
``rgb``); a previously-encoded ``{"solid": {"color": ...}}``
object is also accepted and unwrapped automatically
- ``raw`` — pass the value untouched (advanced)
Type names are case-insensitive. Unknown hints raise with the
full list.reset_properties: Optional list of property names to delete from the visual's property bag. Use this to revert a property to Power BI's default — passing an empty string would leave the key set to a blank value instead.
Examples
Set a title (text):
pbi_set_visual_format_property(
extract_folder, page, visual_id,
object_name="title",
properties={"text": "Sales", "show": True},
property_types={"text": "text", "show": "bool"},
)Set a fill color (single-series default):
pbi_set_visual_format_property(
...,
object_name="dataPoint",
properties={"defaultColor": "#4472C4"},
property_types={"defaultColor": "color"},
)Reset a property to Power BI's default:
pbi_set_visual_format_property(
...,
object_name="title",
reset_properties=["text"],
)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | Yes | ||
| visual_id | Yes | ||
| properties | No | ||
| object_name | Yes | ||
| extract_folder | Yes | ||
| property_types | No | ||
| reset_properties | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |