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

Report Themes - Enable further format options via JSON

Hi,

 

 

I'm looking for a possility to creat a template theme I can use for reports.
To preconfigure colors is not an issue. But how can I enable further format options such as "Data labels".
It seems to me that the list of options on https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-report-themes/ is not complete in order to configure all possible format options.
Do you have any experience so far or hints reagrding this issue?

 

Thanks a lot.

Dom

1 ACCEPTED SOLUTION

Hi @Anonymous,

 

Please download the sample JSON file here. You can import the theme file into your pbix file to see whether it works. Also, you can open the json file as a reference, to see how to correctly set data labels for chart visual.

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

6 REPLIES 6
v-yulgu-msft
Employee
Employee

Hi @Anonymous,

 

Since Power BI desktop September update, more theme file format was added to include full control over your chart styling.

This means you can do things like:

  • Set all your charts to use size 14 font
  • Set your matrix values to use Calibri font
  • Turn data labels on for specific charts

 

Reference: Theming preview update – chart style controls

 

If you want more format options which are not supported now, you could submit it at idea page.

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
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-yulgu-msft,

 

That was the information I was looking for. So far I only checked the documentation on https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-report-themes/ but I overlooked the information of the link you have provided. Thanks.

Anyway, I'm still unable to actiate the format option "Data labels":

 

15-09-2017 09-21-18.jpg

 

My JSON file looks like this at the moment:

 

{
    "name": "BringItOn",
    "dataColors": [
        "#6876ff",
        "#a9d1f4",
        "#63bb80",
        "#783b3c",
        "#000831",
        "#141256",
        "#d0d0d7"
    ],
    "background": "#f2f2f3",
    "foreground": "#575760",
    "tableAccent": "#aba9f4",
    "visualStyles":{
        "*":{
            "*":{
                "*":[{
                    "fontSize":14,
                    "fontFamily":"Arial",
                    "dataLabels": [{
                    			   "show": true
                    			}],							
                    "axisType": [{
                                  "value": "Categorical",
                		  "displayName": "Categorical"
                									}]
                }]
            }
        }
     }
}

 

 

I also tried the cardName"labels", which is refering to "Data labels" according to the documentation on  https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-report-themes/.

 

Any ideas?

 

Cheers,

Dom

Hi @Anonymous,

 

Please download the sample JSON file here. You can import the theme file into your pbix file to see whether it works. Also, you can open the json file as a reference, to see how to correctly set data labels for chart visual.

 

Best regards,
Yuliana Gu

Community Support Team _ Yuliana Gu
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-yulgu-msft,

 

Good news in the meantime. I used the example you have provided to activate data labels sucessfully. Thanks.

Now I am able to turn of the data labels for all visuals or for selected visuals only.

Example for all visuals:

 

{
    "name": "DataLabels4All",
    "dataColors": ["#FA3C78", "#3C32DC", "#8996FF", "#000175", "#6B008A"],
    "background":"#FFFFFF",
    "foreground": "#3C32DC",
    "tableAccent": "#FA3C78",
		"visualStyles":{
        "*":{
            "*":{
                "*":[{
                   		 "responsive":true,
				  "wordWrap":true,
                    		"fontSize":14,
                    		"fontFamily":"Arial"
                		}],
			    				"wordWrap":[{
				    					"show":true
                						}],
                "labels":[{
                    			"show":true,
                    			"labelOrientation":"horizontal",
                    			"fontSize":9,
                    			"labelDensity":77
                				}],
                "categoryLabels":[{
                    				"show":true
                			}],
                "categoryAxis":[{
                    			"showAxisTitle":true
                			}],
                "valueAxis":[{
                    		"showAxisTitle":true
                		}]
		    		}	 
		   	}		    
		   }  
}

And here me example to enbale data labels for line charts only:

 

 

{
    "name": "DataLabelsLineCharts",
    "dataColors": ["#FA3C78", "#3C32DC", "#8996FF", "#000175", "#6B008A"],
    "background":"#FFFFFF",
    "foreground": "#3C32DC",
    "tableAccent": "#FA3C78",
		"visualStyles":{
        "*":{
            "*":{
                "*":[{
                   		 "responsive":true,
				 "wordWrap":true,
                    		"fontSize":14,
                    		"fontFamily":"Arial"
                		}],
			      "wordWrap":[{
				    		"show":true
                						}],
                "categoryLabels":[{
                    			"show":true
                			}],
                "categoryAxis":[{
                    		"showAxisTitle":true
                		}],
                "valueAxis":[{
                    		"showAxisTitle":true
                		}]
		    		}	 
		   		},
		   		"lineChart":{
		   				 "*":{
			    				"labels":[{
                    					"show":true,
                    					"labelOrientation":"horizontal",
                    					"fontSize":9,
                    					"labelDensity":77
                				}]
		    }		  
		    }  
		   }  
}

Another questions what are "categoryLabels" for? About what categories are we talking and under which card can I find it?

 

 

Thank you.

 

Cheers,

Dom

Anonymous
Not applicable

Short followup... I found the purpose of "categoryLabels". Those labels are used for ither visual types such as "Card". There you are able to activate the format option "Category label".

PowerDAX
Resolver III
Resolver III

Hi Dom - they are indeed still adding theme options.

 

Here is a great link to assist in building the JSON required - Michael is adding theme options to the generator as they become available.

 

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

powerdax.com

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.