Forum Discussion
Custom Visual Formatting with JSON File
Can anyone tell me if it's possible to format an imported custom visual with an imported JSON file? I know this is possible with the visuals already available but can't quite get it to work for the SPC visual created by the government of western australia.
Thanks
9 Replies
- andrjohnsHelper II
Hi Matthew,
I'm the dev for the SPC visual, apologies for these issues! I haven't worked with JSON theming before, so I'm not sure if/how I need to enable it within the visual.
I'll add it to the to-do list to investigate and hopefully resolve asap. You can track in this Github issue: Investigate report theme support · Issue #428 · AUS-DOH-Safety-and-Quality/PowerBI-SPC
Also feel free to open any other issues/requests for the visual, or reach out over email.
Cheers,
Andrew
- MallinMatthewNew Member
Hi Andrew,
Thanks for taking a look into it. I'll also keep you posted if I have any success with it.
Cheers,
Matthew
- v-lgarikapatCommunity Support
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 - v-lgarikapatCommunity Support
Thanks for your prompt response
I wanted to follow up and confirm whether you’ve had a chance to review the information we shared. If you have any questions or need further clarification, please don’t hesitate to reach out
We appreciate your collaboration and support!
Best regards,
LakshmiNarayana- MallinMatthewNew Member
Hi v-lgarikapat,
Thanks for the response. I've not had a chance to look into it yet but will let you know how I get on when I do.
Thanks,Matthew
- v-lgarikapatCommunity Support
Hi MallinMatthew ,
Thanks for your message. No worries at all take your time. Let me know how it goes when you get a chance to look into it.
We appreciate your collaboration and support!
Best Regards,
Lakshmi.
- v-lgarikapatCommunity Support
Hi MallinMatthew ,
We’d like to confirm whether your issue has been successfully resolved. If you still have any questions or need further assistance, please don’t hesitate to reach out we’d be happy to continue supporting you.
We truly appreciate your continued engagement and thank you for being an active and valued member of the community. If you’re still experiencing any challenges, we’re more than happy to assist you further.
We look forward to hearing from you.
Best regards,
Lakshmi- v-lgarikapatCommunity Support
Hi MallinMatthew ,
We’d like to confirm whether your issue has been successfully resolved. If you still have any questions or need further assistance, please don’t hesitate to reach out we’d be happy to continue supporting you.
We truly appreciate your continued engagement and thank you for being an active and valued member of the community. If you’re still experiencing any challenges, we’re more than happy to assist you further.
We look forward to hearing from you.
Best regards,
Lakshmi