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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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

@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.

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.