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
le_tool
Helper I
Helper I

.json revert to default

Hello guys,

I am trying to set one setting for my custom theme, but it just doesn't load up. Only thing that gets it turned on, is to manually click the button "revert to deafult"(in this case I cannot switch on the "defaultIconIsCircle" in the area chart):

 

default.png

According to .json custom theme documentation on microsoft page:

You need only specify the formatting elements you want to adjust. Any formatting elements that aren't included in the JSON file revert to their default values and settings.

Thus - when you omit some setting in the .json file, it should act is if you've actually clicked that "revert to default" button. But it doesn't get reset.

 

My question is, does somebody have line of code that I can insert under the visual into the .json code which gets the visual/whole theme reset? e.g.

 

"barChart": {
"*": {
"general": [{
"responsive": true
}],
"legend": [{
"show": true

etc..

+ "revertToDefaults": true

 

Thank you!

 

9 REPLIES 9
HaveeshPerla_1
Helper II
Helper II

Hi @le_tool @IfYouBuildIt , 

 

Even I was in search for the dynamic approach to revoke to default option via JSON. but as per my analysis i couldn't find this command "reverttoDefault" as a valid command. 

Please let me know if you found solution or any alternative approach for this?

 

Regards,

Haveesh

amirabedhiafi
Impactful Individual
Impactful Individual

https://docs.microsoft.com/en-us/power-bi/create-reports/desktop-report-themes

Amira Bedhiafi
Full Stack Business Intelligence Consultant @Capgemini
amitchandak
Super User
Super User

Hello @amitchandak ,

 

I don't see any mention there about the .json setting "revertToDefault".

Hi @le_tool ,

I'm not clear about your requirement. What you are looking for is the backend codes of "Revert to default" button function? Or do you want to ask whether there is any attribute in the json file that can switch the function of "Restore to Default" button?

Best Regards

Rena

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

Hello @v-yiruan-msft ,

yes, I am looking for backend code that can be implemented into the .json file which will revert the (clicks on that button) settings to default. As this is not the case in some of the settings.

@le_tool did you ever find a way to revert all visuals to default using .json? I'm trying to do the same.

@IfYouBuildIt Hi, no luck so far 😕

@le_tool Checking back in. Did you ever find a solution? I did not

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.