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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Formatting the Default Tooltip via Json Theme file

Hi All,


Trying to format the Default Tooltip - change black background colour / font colour / size / etc... (any and all attributes ) but via the Json theme file - I know its possible - done it before but mislaid the details... and sadly a web trawl to no avail...

Please note I am not seeking to create a Report Tip and update all my visuals... its just the json theme file syntax I am after to set the default tooltip attributes.

Many thanks in advance 🙂

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @v-yingjl 

 

Semantics on what I meant or how you interpretted what I said but yes I was after the Json code to change to the default tooltip in the Theme... and the good news is that I have found it 🙂

 

{
	"name":				"Report Theme Name",

	"visualStyles":	{	"*":	{	"*":	{	"visualTooltip": 	[{	"type": 			"Default",
																		"titleFontColor": 	{"solid": {"color": "#000080"}},
																		"valueFontColor": 	{"solid": {"color": "#000080"}},
																		"background": 		{"solid": {"color": "#F0F0F0"}}
																	}]
											}
								},
					}
}

 

View solution in original post

5 REPLIES 5
EMC
Helper I
Helper I

Is this the only way we can change the default font size for a tool tip? We're embedding Power BI charts onto a webpage but on mobile the tool tip font is massive as it doesn't seem to be responsive.

v-yingjl
Community Support
Community Support

Hi @Anonymous ,

You should know that we cannot set the theme of tooltips by .json file in power bi desktop.

I think you meant to use the report page as a tooltip, so change the theme of report page by .json file.

Basic json format:

{
       "name": "St Patrick's Day",
       "dataColors": ["#568410", "#3A6108", "#70A322", "#915203", "#D79A12", "#bb7711", "#114400", "#aacc66"],
       "background":"#FFFFFF",
       "foreground": "#3A6108",
       "tableAccent": "#568410"
   }

A basic theme that defines these colors might appear as follows:

{
    "name": "Custom Theme",
    "dataColors": [
        "#118DFF",
        "#12239E",
        "#E66C37",
        "#6B007B",
        "#E044A7",
        "#744EC2",
        "#D9B300",
        "#D64550",
        "#197278",
        "#1AAB40"
    ],
    "good": "#1AAB40",
    "neutral": "#D9B300",
    "bad": "#D64554",
    "maximum": "#118DFF",
    "center": "#D9B300",
    "minimum": "#DEEFFF",
    "null": "#FF7F48"
}

You can refer this document which introducing the theme of report by .json file in details that could help you better:

Report theme JSON file format 

 

Best Regards,
Yingjie Li

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-yingjl 

 

Semantics on what I meant or how you interpretted what I said but yes I was after the Json code to change to the default tooltip in the Theme... and the good news is that I have found it 🙂

 

{
	"name":				"Report Theme Name",

	"visualStyles":	{	"*":	{	"*":	{	"visualTooltip": 	[{	"type": 			"Default",
																		"titleFontColor": 	{"solid": {"color": "#000080"}},
																		"valueFontColor": 	{"solid": {"color": "#000080"}},
																		"background": 		{"solid": {"color": "#F0F0F0"}}
																	}]
											}
								},
					}
}

 

amitchandak
Super User
Super User

@Anonymous , check if theme generator can help is creating one that server the purpose

https://powerbi.tips/tools/report-theme-generator-v3/

Anonymous
Not applicable

Sadly No - (something I recall from the past but had another look just in case it had been updated since last time I looked ) but thanks for trying 🙂

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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