mirror of
https://github.com/Kingsrook/qqq-frontend-material-dashboard.git
synced 2025-07-18 13:20:43 +00:00
CE-604 Let data from backend drive backgroundColors if it wants
This commit is contained in:
@ -65,7 +65,10 @@ function PieChart({description, chartData, chartSubheaderData}: Props): JSX.Elem
|
||||
|
||||
if (chartData && chartData.dataset)
|
||||
{
|
||||
chartData.dataset.backgroundColors = chartColors;
|
||||
if(!chartData.dataset.backgroundColors)
|
||||
{
|
||||
chartData.dataset.backgroundColors = chartColors;
|
||||
}
|
||||
}
|
||||
const {data, options} = configs(chartData?.labels || [], chartData?.dataset || {});
|
||||
|
||||
|
Reference in New Issue
Block a user