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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

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
November Carousel

Fabric Community Update - November 2024

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

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

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