cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Regular Visitor

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

Accepted Solutions
Highlighted
Regular Visitor

Re: Formatting the Default Tooltip via Json Theme file

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
Highlighted
Super User IX
Super User IX

Re: Formatting the Default Tooltip via Json Theme file

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

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



Did I answer your question? Mark my post as a solution! Appreciate your Kudos!!
Dashboard of My Blogs !! YouTube Channel !! Connect on Linkedin

Proud to be a Super User!

Highlighted
Regular Visitor

Re: Formatting the Default Tooltip via Json Theme file

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 🙂

Highlighted
Community Support
Community Support

Re: Formatting the Default Tooltip via Json Theme file

Hi @JezNewSig ,

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.

Highlighted
Regular Visitor

Re: Formatting the Default Tooltip via Json Theme file

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

Highlighted
Helper I
Helper I

Re: Formatting the Default Tooltip via Json Theme file

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.

Helpful resources

Announcements

August Community Highlights

Check out a full recap of the month!

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power BI

Join us for an in-depth look at the new Power BI features and capabilities at the free Microsoft Business Applications Launch Event.

Top Kudoed Authors