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
santiagomur
Resolver II
Resolver II

Define Colors for a Ribbon chart

Hi, 

 

i am trying to create a custom theme, and i need to define different colors for the ribbon chart.

 

i create the data colors at the begging of the json code. but for this chart i need diferent order.  

 

this is my json 

 

i try with "dataPoint": [{
"defaultColor": { "solid": { "color": "#c21b17"}}  ..... but i don't know how to stablish a second one 

 

 

"dataColors": [

"#6f7072",
"#B0B2B3",
"#c21b17",
"#E7A4A5",
"#8e1230",
"#e9573d",
"#752127",
"#c21c1d",
"#B15C49",
"#D16944",
"#fd625e",
"#088a08",
"#6f7072"
],

 

"ribbonChart": {
"*": {
"general": [{
"responsive": false
}],
"legend": [{
"show": true,
"position": "Top",
"showTitle": true,
"titleText": "",
"labelColor": { "solid": { "color": "#6F7072"}},
"fontFamily": "Arial",
"fontSize": 9
}],
"categoryAxis": [{
"show": true,
"labelColor": { "solid": { "color": "#6F7072"}},
"fontSize": 8,
"fontFamily": "Arial",
"preferredCategoryWidth": 30,
"maxMarginFactor": 28,
"innerPadding": 22,
"concatenateLabels": true,
"showAxisTitle": false,
"axisStyle": "showTitleOnly",
"titleColor": { "solid": { "color": "#6F7072"}},
"titleText": "",
"titleFontSize": 11,
"titleFontFamily": "Arial Black"
}],

"labels": [{
"show": true,
"color": { "solid": { "color": "#6F7072"}},
"labelDisplayUnits": 0,
"labelPrecision": 0,
"labelOrientation": "horizontal",
"labelPosition": "InsideCenter",
"fontSize": 8,
"fontFamily": "Arial",
"enableBackground": false,
"backgroundColor": { "solid": { "color": "#FFFFFF"}},
"backgroundTransparency": 30
}],
"plotArea": [{
"transparency": 20
 "dataPoint": [{
"defaultColor": { "solid": { "color": "#c21b17"}}}],
"ribbonChart": [{
"colorBands": true,
"bandsTransparency": 20,
"showBorder": false
}]
}
},

1 REPLY 1
v-lid-msft
Community Support
Community Support

Hi @santiagomur ,

 

Based on this document, dataColors is the list of hex code color codes to use for data in Power BI Desktop visuals. The list can have as many or as few colors as you want, and this label is put as the same level of config name.

 

After my test, the datacolor label in config file will apply to all visual in this report, we did not found where can put the datacolor in visual level config. Though we could set color for each ribbon visual, but it is not an effective solution. Perhaps you can submit the requirement to ideas and add your comments there to make this feature coming sooner : https://ideas.powerbi.com/forums/265200-power-bi-ideas

 

 

Best regards,

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

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

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.