Reply
avatar user
Anonymous
Not applicable

Can't turn off data labels once they have been set to 'show: true' in JSON file.

I am working on a JSON file for a custom theme for Power BI. For some of the visuals I have set that data labels should be on. However when I import the theme, I can't manually change this setting in the desktop version. So if I have set the data labels to be on in the JSON file, I can't turn them off manually in desktop version of Power BI. The reverse also happens. If I have turned data labels off in the JSON file, they can't be turned in manually in Power BI. It's only an issue with Data labels. Fx I can turn Total labels and Series labels on/off as I want no matter the settings in the JSON file. 

 

The only work-around I found is to go into Data Labels > Apply settings to > and then choose each series and turn off data labels for the series I want. However this is not feasible in settings, where there are many series.

 

I would like to be able to choose whether the Data Labels are on or off by default, but I still need to be able to change it in Power BI for some specific cases of data.

 

Is this a general thing, or is it something specific in my JSON file?

 

I provided an example of the 'labels' section of the JSON file below:

Don't know if I should provide the entire JSON file here, as it is quite long?

 

"labels": [
{
"show": true,
"showSeries": true,
"color": {
"solid": {
"color": {
"expr": {
"ThemeDataColor": {
"ColorId": 0,
"Percent": 0
}
}
}
}
},
"labelDisplayUnits": 0,
"labelPosition": "Auto",
"enableBackground": true,
"backgroundColor": {
"solid": {
"color": {
"expr": {
"ThemeDataColor": {
"ColorId": 6,
"Percent": 0.2
}
}
}
}
},
"backgroundTransparency": 0,
"labelOverflow": false,
"showAll": false,
"fontSize": 8,
"fontFamily": "Arial"
}
]

1 REPLY 1
jpalombo
Regular Visitor

I noticed the same thing within my JSON theme today. I'm going to guess this is a bug as there have been mulitple JSON theme bugs since their February update I beleive. Thank you for your workaround though! 

avatar user

Helpful resources

Announcements
March PBI video - carousel

Power BI Monthly Update - March 2025

Check out the March 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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

Top Solution Authors (Last Month)
Top Kudoed Authors (Last Month)