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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

Report Theme font color relative slicer

Hi, 

 

I'm looking for the property name for the field that is responsible the formatting for a relative slicer. I could not find it in the documentation and have tried multiple values. "date" only affects the between, before and after slicers and "items" is for list and dropdown, but the relative name is still a mystery to me. See below for a snippet of the json file.

 

Hope any of you can help me out! Thanks in advance!

 

Koen

 

 .... 
      "slicer": {
            "*": {
                "background": [
                    {
                        "show": true,
                        "color": {
                            "solid": {
                                "color": "#FF6e00"
                            }
                        },
                        "transparency": 0
                    }
                ],
                "header": [
                    {
                        "show": true,
                        "fontColor": {
                            "solid": {
                                "color": "#FFFFFF"
                            }
                        }
                    }
                ],
                "date": [
                    {
                        "show": true,
                        "fontColor": {
                            "solid": {
                                "color": "#FFFFFF"
                            }
                        }
                    }
                ]
            }
        },
....

slicer.PNGnumeric inputs.PNG

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @v-chuncz-msft ,

 

Thanks for the link. It was actualy the linked topic in your linked topic that got me to the sollution. 

 

For anyone else looking, the fieldname is named: "numericInputStyle".

 

You can find this, and every other fieldname, by doing the following:

  1. Create and save a report with the desired layout
  2. Rename the .pbix file to a .zip or .rar file
  3. Unpack the file with 7zip or similar 
  4. Open, in the unpacked dir, the directory Report
  5. Open the "Layout" file . I did it with VSCode (because of the easy formatting) but you can use any text editor
  6. In here are all the layout properties of your file, look for the visuals and their properties and use them in your theme file.

Hope this shortens the search for anyone.

 

Koen

 

View solution in original post

7 REPLIES 7
v-chuncz-msft
Community Support
Community Support

@Anonymous 

 

You may take a look at the post below.

https://community.powerbi.com/t5/Desktop/JSON-theme-Data-label-quot-Display-units-quot-How-to-set-to...

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi @v-chuncz-msft ,

 

Thanks for the link. It was actualy the linked topic in your linked topic that got me to the sollution. 

 

For anyone else looking, the fieldname is named: "numericInputStyle".

 

You can find this, and every other fieldname, by doing the following:

  1. Create and save a report with the desired layout
  2. Rename the .pbix file to a .zip or .rar file
  3. Unpack the file with 7zip or similar 
  4. Open, in the unpacked dir, the directory Report
  5. Open the "Layout" file . I did it with VSCode (because of the easy formatting) but you can use any text editor
  6. In here are all the layout properties of your file, look for the visuals and their properties and use them in your theme file.

Hope this shortens the search for anyone.

 

Koen

 

Hi @Anonymous ,

 

I tried "numericInputStyle" but it fails. Could you support me here? thanks.

"slicer": {
			"*": {
				"general": [
					{
						"outlineColor": {
							"solid": {
								"color": "#ffffff"
							}
						},
						"outlineWeight": 2,
						"orientation": "vertical",
						"responsive": true
					}
				],
				"selection": [
					{
						"selectAllCheckboxEnabled": true,
						"singleSelect": false
					}
				],
				"header": [
					{
						"show": true,
						"fontColor": {
							"solid": {
								"color": "#ffffff"
							}
						},
						"background": {
							"solid": {
								"color": "#28323C"
							}
						},
						"outline": "None",
						"fontFamily": "Arial"
					}
				],
				"slider":[{
							"color": {"solid": {"color": "#000000"}
			}}],
				"numericInputStyle": [
					{ 	"show": true,
						"fontColor":{
								"solid":{
									"color":{"#ffffff"
											}
						
										}	
									}
					}
								],
								
				"date": [
                    {
                        "show": true,
                        "fontColor": {
                            "solid": {
                                "color": "#FFFFFF"
                            }
                        }
                    }
                ],
				"items": [
					{
						"fontColor": {
							"solid": {
								"color": "#ffffff"
							}
						},
						"background": {
							"solid": {
								"color": "#28323C"
							}
						},
						"outline": "None",
						"fontFamily": "Arial"
					}
				]
			}
		},

Thank you in advance!

 

Cheers

Imex197

Anonymous
Not applicable

Hi @Imex197 ,

 

I'm affraid I dont have direct access to the place where I applied my solution, but I will try. How do you mean it fails? It doenst do anything or do you get an error importing the file?

 

I extracted the properties from a local file, and see some differences with your code. Could you see if altering it to this format works?

            "numericInputStyle": [
                {
                    "properties": {
                        "fontColor": {
                            "solid": {
                                "color": {
                                    "expr": {
                                        "Literal": {
                                            "Value": "'#ff273c'"
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            ]

 

Hi @Anonymous ,

 

thanks for your anwser but it is still not working.

"numericInputStyle": [
					{ 	
						"properties": {
                        "fontColor": {
                            "solid": {
                                "color": {
                                    "expr": {
                                        "Literal": {
                                            "Value": "'#ffffff'"
											}
										}	
									}
								}
							}
						}
					}
				],

Imex197_0-1598245768383.png

Imex197_1-1598245804013.png

Font color should be white.

 

Hope you have an idea.

 

Cheers

Imex197

 

 

Sorry, I know this is a old post but I wanted to point out that in your screenshot, I can see that you can click "revert to default." This means some settings were applied in this section which will always override theme settings. Any changes you make to your theme for this section won't be reflected by this visual unless you revert to default. Once you click "revert to default" you'll see that the text "revert to default" is disabled- indicating the default selections are the active settings for this section of your visual.

Anonymous
Not applicable

Hi @Imex197 ,

 

I was able to get the old file I created for from this post. I tested it and it still works. You problably need to change stuff/copy stuff out, but you should be able to find what your looking for.

 

{
    "name": "This theme works",
    "visualStyles": {
        "page": {
            "*": {
                "outspace": [
                    {
                        "color": {
                            "solid": {
                                "color": "#e6e6e6"
                            }
                        },
                        "transparency": 0
                    }
                ],
                "background": [
                    {
                        "show": true,
                        "color": {
                            "solid": {
                                "color": "#FFFFFF"
                            }
                        },
                        "transparency": 100
                    }
                ]
            }
        },
        "slicer": {
            "*": {
                "background": [
                    {
                        "show": true,
                        "color": {
                            "solid": {
                                "color": "#FF6e00"
                            }
                        },
                        "transparency": 0
                    }
                ],
                "header": [
                    {
                        "show": true,
                        "fontColor": {
                            "solid": {
                                "color": "#FFFFFF"
                            }
                        }
                    }
                ],
                "numericInputStyle": [
                    {
                        "show": true,
                        "fontColor": {
                            "solid": {
                                "color": "#FFFFFF"
                            }
                        }
                    }
                ],
                "date": [
                    {
                        "show": true,
                        "fontColor": {
                            "solid": {
                                "color": "#FFFFFF"
                            }
                        }
                    }
                ],
                "items": [
                    {
                        "show": true,
                        "fontColor": {
                            "solid": {
                                "color": "#000000"
                            }
                        }
                    }
                ]
            }
        },
        "textbox": {
            "*": {
                "border": [
                    {
                        "show": false,
                        "color": {
                            "solid": {
                                "color": "#000000"
                            }
                        }
                    }
                ],
                "background": [
                    {
                        "show": true,
                        "color": {
                            "solid": {
                                "color": "#DDDDDD"
                            }
                        },
                        "transparency": 100
                    }
                ],
                "general": [
                    {
                        "properties": {
                            "paragraphs": [
                                {
                                    "textRuns": [
                                        {
                                            "textStyle": {
                                                "fontFamily": "Segoe (Bold)",
                                                "fontSize": "60px"
                                            }
                                        }
                                    ],
                                    "horizontalTextAlignment": "center"
                                }
                            ]
                        }
                    }
                ]
            }
        },
        "*": {
            "*": {
                "border": [
                    {
                        "show": true,
                        "color": {
                            "solid": {
                                "color": "#000000"
                            }
                        }
                    }
                ],
                "background": [
                    {
                        "show": true,
                        "color": {
                            "solid": {
                                "color": "#FFFFFF"
                            }
                        },
                        "transparency": 0
                    }
                ],
                "values": [
                    {
                        "urlIcon": true
                    }
                ],
                "columnHeaders": [
                    {
                        "autoSizeColumnWidth": false
                    }
                ]
            }
        }
    }
}

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.