I’ve found a workaround to apply the colours I need to my donut chart by using if statements but my legend is still showing the default quickSight colour palette and does not reflect the colours on the donut chart. Is there any workaround?
{
“chart”: {
“type”: “bar”,
“polar”: true
},“pane”: {
“size”: “100%”,
“innerSize”: “50%”,
“endAngle”: 300
},“xAxis”: {
“type”: “category”,
“categories”: [“unique”, [“getColumn”, 0]],"labels": { "step": 1, "align": "right", "allowOverlap": false, "y": 3, "style": { "fontFamily": "Calibri, sans-serif", "fontSize": "16px" } }, "lineWidth": 0, "gridLineWidth": 0
},
“yAxis”: {
“lineWidth”: 0,
“showLastLabel”: true,
“gridLineWidth”: 0,
“labels”: {
“enabled”: false // Disables all labels on the y-axis
}
},“plotOptions”: {
“bar”: {
“stacking”: “normal”,
“borderWidth”: 0,
“pointPadding”: 0,
“groupPadding”: 0.15,
“borderRadius”: “20%”
}
},“series”: [
“map”,
//[“literal”, [“Customer data”, “Baseline data”]], // reversed stacking order
[“unique”, [“getColumn”, 1]], //source
{
“name”: [“item”], //source
“data”: [
“map”,
[
“filter”,
[“getColumn”, 0, 1, 2], //source, Persona, Value
[“==”, [“get”, [“item”], 1], [“item”, 2]] //Where Persona = source from outer map
],{ "name": ["get", ["item"], 0], //source "y": ["get", ["item"], 2], //Percent "color": [ "case", ["==", ["get", ["item"], 1], "Persona 1"], "#a784ff", ["==", ["get", ["item"], 1], "Persona 2"], "#50a2ff", ["==", ["get", ["item"], 1], "Persona 3"], "#00d4f2", "#000000" // Fallback/default color ] } ] }
],
“tooltip”: {
“outside”: true,
“useHTML”: true,
“headerFormat”: “{point.x}
”,
“pointFormat”: “<span style="color:{point.color}">\u25CF {series.name}: {point.y:,.0f}%”
},
“legend”: {
“enabled”:true,
“itemStyle”: {
“fontFamily”: “Calibri, sans-serif”,
“fontSize”: “16px”
},
“itemHoverStyle”: {
“color”: “#333333”
},
“symbolWidth”: 20
}
}