Forum Discussion
Configure list slicer in theme
- 10 months ago
Hi tobny76 ,
Thanks for reaching out to Microsoft Fabric Community and thanks for sharing the update.
From what I’ve seen in similar discussions such as this thread: Solved: Re: Unable to change new slicer font colour with c... - Microsoft Fabric Community, the $id: "selection:selected" property works for the new slicer visual (advancedSlicerVisual) when changing the font or background color for selected items.
However, this behavior doesn’t seem to apply in the same way to the listSlicer.
For the classic list slicer, only a few formatting options such as background color and basic text settings appear to take effect through JSON theming, while selection-specific colors may not currently respond.
You can refer to the official documentation on Power BI JSON themes
for the list of supported visual style properties. It might also be worth testing with future Power BI Desktop versions in case expanded support for listSlicer theming becomes available.Hope this helps. Please reach out for further assistance.
Thank you.
Hi tobny76
You can customize your List Slicer colors through a Power BI JSON theme file.
Here’s a quick example:
{
"visualStyles": {
"slicer": {
"*": {
"selection": [
{ "fontColor": { "solid": { "color": "#FFFFFF" } } },
{ "background": { "solid": { "color": "#0078D4" } } }
],
"unselected": [
{ "fontColor": { "solid": { "color": "#333333" } } },
{ "background": { "solid": { "color": "#F2F2F2" } } }
]
}
}
}
}
Could you please try below steps:
-
Save this as a .json file.
-
In Power BI >> View >>Themes >> Browse for themes, import the file.
This will apply your custom background and text colors to the list slicer automatically.
Now I have at least solved the background, I changed "slicer" to "listSlicer".
But I don't get the fontcolor and background for selection/unselected to work.
{
"name": "Custom List Slicer Theme",
"visualStyles": {
"listSlicer": {
"*": {
"background": [{
"show": true,
"color": {
"solid": {
"color": "#00FF00"
}
},
"transparency": 0
}
]
}
}
}
}
- v-veshwara-msft10 months ago
Community Support
Hi tobny76 ,
Thanks for reaching out to Microsoft Fabric Community and thanks for sharing the update.
From what I’ve seen in similar discussions such as this thread: Solved: Re: Unable to change new slicer font colour with c... - Microsoft Fabric Community, the $id: "selection:selected" property works for the new slicer visual (advancedSlicerVisual) when changing the font or background color for selected items.
However, this behavior doesn’t seem to apply in the same way to the listSlicer.
For the classic list slicer, only a few formatting options such as background color and basic text settings appear to take effect through JSON theming, while selection-specific colors may not currently respond.
You can refer to the official documentation on Power BI JSON themes
for the list of supported visual style properties. It might also be worth testing with future Power BI Desktop versions in case expanded support for listSlicer theming becomes available.Hope this helps. Please reach out for further assistance.
Thank you.
- v-veshwara-msft10 months ago
Community Support
Hi tobny76 ,
Just wanted to check if the response provided was helpful. If further assistance is needed, please reach out.
Thank you.