Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago

Different theme settings for dropdown vs list modes in slicer (JSON)

Is it possible in a JSON for custom theme to set coloured background for the selection field in a slicer in collapsed dropdown mode, and in the same time set it to be transparent when slicer is in list mode?

 

I'm creating a theme for a new customer that have a coloured canvas and where the visuals will have a white background with rounded corners and shadow effect. But the slicers will have transparent background, so I wan't to have a white background in the selection field (collapsed dropdown), but transparent background when the slicer is presented as a list. This is what I want to accomplish (collapsed dropdown in left slicer here manually defined to #FFFFFF):

However, I can only find 3 different cardNames to use when setting background colours for the slicer selection fields, except the one for setting up default:

*= Returns coloured selection field for all slicer types
numericInputStyle= Returns coloured selection field for Relative slicers
Date= Returns coloured selection field for Between, Before and After slicers
Items= Returns coloured selection field for Dropdown and List

 

So what I am looking for is a way to define the cardName "Items" separately for dropdown versus list. Because when defining background colour for Items it will apply on both dropdown and list:

 

This is the part about slicers in the theme script I have created:

 

 

	"slicer":{
		"*":{
			"background":[
			  {
				"transparency": 100
			  }
			],
			"*": [   (This is what I want to replace with a solution for all slicers except when in list mode)
			  {
				"background": { "solid": { "color": "#FFFFFF"}},
				"textSize": 10
			  }
			],
			"header": [
			  {
				"background": { "transparency": 100},
				"textSize": 12
			  }
			],
			"border":[
			  {
				"show": false
			  }
			],
			"dropShadow": [
			  {
				"show": false
			  }
            ]
		}
		
	},

 

 

 

Please note that I'm looking for a solution to use in a json for a theme template to be used widely within my customers organisation, NOT manually setting up background colours in PBIX.

3 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks, but the theme generator unfortunatly only helps on a higher level. For example it helps with how to set up background colour for a slicer, but not down on different slicer types, like the cardNames  "Items", "numericInputStyle" and so on...