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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
NenadV
Helper III
Helper III

Setting multiple colors for bars in Stacked Bar Chart using json theme

I am trying to set multiple colors for stacked bar chart, something like this:Untitled.png

but using json theme. And now I have problem, because I can not set this, altough my json file is in right format, all other properties are set successfully, only this is not working. I tried naming property defaultColor, defaultColors, color,colors, dataColor, dataColors, but nothing is working.

Here is my json file: 

{
    "name":"MyTheme",
    "visualStyles":{
       "barChart":{
          "*": {
             "labels": [{
                "show": true,
                "color": { "solid": { "color": "#e044a7"}},
                "labelDisplayUnits": 1,
                "labelPrecision": 0,
                "fontFamily": "Calibri",
                "fontSize": 11,
                "labelPosition": "OutsideEnd"
             }],
             "dataPoint":[{
                "defaultColors": [{ "solid": { "color": "#1A355E"}},{ "solid": { "color": "#000000"}},{ "solid": { "color": "#ffffff"}}]
             }]
          }
       }
    }
}

 

3 REPLIES 3
amitchandak
Super User
Super User

@NenadV , refer if that tool can help to generate 

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

 

Other related topic

https://community.powerbi.com/t5/Desktop/Custom-Report-Theme-JSON-Property-settings-in-Tables-Matrix...

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak , this theme generator does not help, using it I can only set multiple colors on whole report level, but not on stacked bar chart level.

Anonymous
Not applicable

Hi @NenadV,

 

I've just come across a similar problem but for the Line and clustered column visual. Did you find a solution for the json property defaultcolors?

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors