cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
tjd
Impactful Individual
Impactful Individual

Custom Theme for new Filter Pane

Anyone know the JSON code for setting the new Filter Pane background and border?

8 REPLIES 8
Rian_II
Advocate III
Advocate III

Hi @tjd ,

 

This has now been provided by Microsoft. See: https://docs.microsoft.com/en-us/power-bi/power-bi-report-filter-preview#theming-for-filter-pane

 

It is not in a nice format, but I changed it and pushed it to this Github repo: https://github.com/deldersveld/PowerBI-ThemeTemplates (hope it will be merged soon)

 

BTW, the above repo has been indispensable for me in creating custom themes.

 

Kind regards,
Rian

 

Please mark my post as a solution if it solves your problem.

ajsteers
Frequent Visitor

(UPDATE: I worked throught the below issues. See my latest post for full solution and sample code.)

 

@Rian_II - Thanks very much for your post but there are some problems in both links unfortunately and (although there seems to be a solution somewhere in the MS link), I was unable to implement this after several failed attempts. 

 

1) For the link to MS doc page, there is no instruction on which level that JSON snippet should be inserted - I tried at the root level of the JSON doc and I also tried under visualStyles and visualStyles.* - both with no success. Can you help out with either full sample code, or else additional guidance on how to implement that snippet. (Referring to the block of code containing references to "outspacePane" and "filterCard".)

 
2) The repo you sent is super helpful but does not contain any obvious references to filter pane formatting. I searched the repo for the text "outspacePane" and "filterCard" with no luck. Also - there are no open PRs or unmerged branches, as far as I can tell.
 
Additional assist would be much appreciated.
 
Thanks!

Posting here working code for other's references.

 

 

{
  "name": "Filter Pane Theme Sample",
  "visualStyles": {
    "page": {
      "*": {
        "outspacePane": [
          {
            "backgroundColor": { "solid": { "color": "#0000ff" } },
            "foregroundColor": { "solid": { "color": "#00ff00" } },
            "transparency": 50,
            "titleSize": 35,
            "headerSize": 8,
            "fontFamily": "Georgia",
            "border": true,
            "borderColor": { "solid": { "color": "#ff0000" } }
          }
        ],
        "filterCard": [
          {
            "$id": "Applied",
            "transparency": 0,
            "backgroundColor": { "solid": { "color": "#ff0000" } },
            "foregroundColor": { "solid": { "color": "#45f442" } },
            "textSize": 30,
            "fontFamily": "Arial",
            "border": true,
            "borderColor": { "solid": { "color": "#ffffff" } },
            "inputBoxColor": { "solid": { "color": "#C8C8C8" } }
          },
          {
            "$id": "Available",
            "transparency": 40,
            "backgroundColor": { "solid": { "color": "#00ff00" } },
            "foregroundColor": { "solid": { "color": "#ffffff" } },
            "textSize": 10,
            "fontFamily": "Times New Roman",
            "border": true,
            "borderColor": { "solid": { "color": "#123456" } },
            "inputBoxColor": { "solid": { "color": "#777777" } }
          }
        ]
      }
    }
  }
}

Kudos and thanks to @Rian_II for the initial link that led to this solution.

 

And a link to my personal gist with full working themes (dark and light)...

 

https://gist.github.com/aaronsteers/5a7f2e454318cc32ea7d0af32c8b710c

Hi @ajsteers  ,

 

Thanks for the kudoes. Looking at your working solution, it seems like you got it to work on the correct level.

 

I must be honest, I don't know yet how to use Github properly so I saw my code got lost somewhere (in a fork). It is however still here:

https://github.com/Rian-II/PowerBI-ThemeTemplates/blob/patch-1/FilterPane.json

 

Thanks for the link to your personal gist. I also had some challenges putting the outspacePane and filterCard on the right levels, but eventually managed to get it working. I see you made a pull request to deldersveld's repo, which is essentially the same as mine.


Below is a link to my personal repo where I dumped my two latest themes:

https://github.com/Rian-II/PowerBI-Themes/tree/master

 

Regards

Rian

1tcook
Frequent Visitor

I have tried to change the font color for ONLY the outspacePane and filterCard but cannot do so. Does anyone know how to do this?

1tcook
Frequent Visitor

Got it 

 

"foregroundColor": {
"solid": {
"color": "#ffffff"
}

v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @tjd,

 

If you want to set the color of the new Filter Pane background and border, I'm afraid that is including the code "dataColors".

 

If you want to set the border turn on/off by default, I'm afraid that may not supported in Json code  currently for report theme.

 

You could submmit your idea in Power BI ideas Forum.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

MBAS Attendee Badge

Claim Your Badge & Digital Swag!

Check out how to claim yours today!

Top Solution Authors
Top Kudoed Authors