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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
andy808
Helper III
Helper III

New Style Preset code in JSON - How do I set up my "Default" in the JSON?

I have a json theme file in which I added "Light Mode Preset" and "Dark Mode Preset". I was thinking "name": "Light Mode Preset" was to define what I want as the default setting? Currently the default seems to be the Power BI default. What do I need to do to make the default - "Light Mode Preset"?

 

My JSON:

"columnChart": {
  "*": {
     "stylePresets": [
        {
          "name": "Light Mode Preset"
        }
      ]
    },
    "Light Mode Preset": {
       "legend": [

 

andy808_0-1746040968121.png

 

2 ACCEPTED SOLUTIONS

hI @andy808 ,
Thank you for the update!Glad it worked! Consider accepting your answer as solution,so other members in the community can easily find it.

Thanks again for your cooperation.Have a great day!


View solution in original post

v-pagayam-msft
Community Support
Community Support

Hi @andy808 ,

I would like to confirm whether you have successfully resolved the issue .

If the issue has been resolved, please mark the helpful reply as a "solution" to indicate that the question has been answered and to assist others in the community.
Thank you for your cooperation. Have a great day.

View solution in original post

7 REPLIES 7
v-pagayam-msft
Community Support
Community Support

Hi @andy808 ,

I would like to confirm whether you have successfully resolved the issue .

If the issue has been resolved, please mark the helpful reply as a "solution" to indicate that the question has been answered and to assist others in the community.
Thank you for your cooperation. Have a great day.

v-pagayam-msft
Community Support
Community Support

Hi @andy808 ,
Has the issue been resolved on your end? If so, please share your solution and mark it as "Accept as Solution." This will assist others in the community who are dealing with similar problems and help them find a solution more quickly.
Thank you.

Sahir_Maharaj
Super User
Super User

Hello @andy808,

 

Can you please try this approach:

"visualStyles": {
  "columnChart": {
    "*": {
      "stylePresets": [
        {
          "name": "Light Mode Preset"
        },
        {
          "name": "Dark Mode Preset"
        }
      ]
    },
    "Light Mode Preset": {
      "legend": {
        // styling
      }
    },
    "Dark Mode Preset": {
      "legend": {
        // styling
      }
    }
  }
}

 


Did I answer your question? Mark my post as a solution, this will help others!

If my response(s) assisted you in any way, don't forget to drop me a "Kudos" 🙂

Kind Regards,
Sahir Maharaj
Data Scientist | Data Engineer | Data Analyst | AI Engineer
P.S. Want me to build your Power BI solution? (Yes, its FREE!)
➤ Lets connect on LinkedIn: Join my network of 15K+ professionals
➤ Join my free newsletter: Data Driven: From 0 to 100
➤ Website: https://sahirmaharaj.com
➤ Email: sahir@sahirmaharaj.com
➤ Want me to build your Power BI solution? Lets chat about how I can assist!
➤ Join my Medium community of 30K readers! Sharing my knowledge about data science and artificial intelligence
➤ Explore my latest project (350K+ views): Wordlit.net
➤ 100+ FREE Power BI Themes: Download Now
LinkedIn Top Voice in Artificial Intelligence, Data Science and Machine Learning

Thank you for your response but there is no change in behavior. This is what I tried:

"columnChart": {
  "*": {
     "stylePresets": [
        {
           "name": "Light Mode Preset"
        },
       {
          "name": "Dark Mode Preset"
       }
     ]
   },
  "Light Mode Preset": {
     "legend": [
       {

Hi @andy808 ,

Thank you for sharing the updated JSON and clarifying the issue and thank you @Sahir_Maharaj for the helpful response!

Power BI does not automatically apply a named preset as the default. Instead, it uses the settings under the "*" section as the default style for all visuals of that type.In this case, columnChart.

To apply your Light Mode styling by default,try using below :


"visualStyles": {
"columnChart": {
"*": {
"legend": {
// Example Light Mode 
"show": true,
"position": "Top",
"fontColor": { "solid": { "color": "#000000" } }
},
"stylePresets": [
{ "name": "Light Mode Preset" },
{ "name": "Dark Mode Preset" }
]
},
"Light Mode Preset": {
"legend": {
// Keep your Light Mode settings here for manual use
}
},
"Dark Mode Preset": {
"legend": {
// Dark Mode settings
}
}
}
}
This way, the Light Mode style is applied by default, and users can still switch to the Dark Mode preset manually in the Format pane if required.

Hope this resolve your query.If so,consider accepting it as solution.

Thank you.

Regards,
Pallavi.

Thanks Pallavi! That does work. From Microsoft documentation it seemed a bit more straight forward, but its not. Thanks again.

andy808_0-1746201733687.png

 

hI @andy808 ,
Thank you for the update!Glad it worked! Consider accepting your answer as solution,so other members in the community can easily find it.

Thanks again for your cooperation.Have a great day!


Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors