Forum Discussion
Custom Visual Formatting with JSON File
Hi MallinMatthew ,
Thanks for reaching out to the Microsoft fabric community forum
It is possible to format the SPC custom visual developed by the Government of Western Australia using a JSON theme file but with a few caveats.
What Works:
The SPC visual supports custom formatting via JSON, like native Power BI visuals. You can define properties like lineColor, dotColor, colour_main, and colour_target within the visualStyles section of your JSON file. Here's a snippet that aligns with what others have successfully used:
"visualStyles": {
"*": {
"PBISPC": {
"*": {
"lineColor": [{ "solid": { "color": "#EA1FED" } }],
"dotColor": [{ "solid": { "color": "#EA1FED" } }],
"colour_main": [{ "solid": { "color": "#EA1FED" } }],
"colour_target": [{ "solid": { "color": "#EA1FED" } }]
}
}
}
}
Might Be Tricky
- The visual must be correctly identified in your JSON under its internal name (PBISPC).
- Not all formatting options may be exposed or supported some properties might be hardcoded or not responsive to theme overrides.
- Ensure your JSON file is applied as a theme in Power BI, not just imported as a visual.
Solved: .json and custom visuals with power bi theme possi... - Microsoft Fabric Community
Solved: SPC and Shewart Analysis in Power BI - Microsoft Fabric Community
We appreciate your engagement and thank you for being an active part of the community.
Best regards,
Lakshmi