Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet 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
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
}]
}
},
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.
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
90 | |
86 | |
83 | |
64 | |
49 |
User | Count |
---|---|
127 | |
108 | |
87 | |
70 | |
66 |