Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
MallinMatthew
New Contributor II

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 9
v-lgarikapat
Valued Contributor III

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

 

andrjohns
New Contributor III

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

 

 

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-lgarikapat
Valued Contributor III

@andrjohns ,

Thanks for your prompt response

@MallinMatthew 

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

 

 

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

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.

 

Hi @MallinMatthew , Just following up to see if you had a chance to look into it. Let us  know when you get a moment appreciate your time!

 

We appreciate your engagement and thank you for being an active part of the community.

 

Best Regards,

Lakshmi.

v-lgarikapat
Valued Contributor III

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-lgarikapat
Valued Contributor III

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

Helpful resources

Announcements
Users online (11,086)