For my React project, I have defined color variables. I want to create my own color palette for the DevExtreme pie chart UI component.
:root {
--my-pastel: var(--rose) var(--beige) var(--bright-orange) var(--brighter-orange) var(--bright-rose) var(--bright-red);
}
Within my function, I need to register the palette:
import { registerPalette } from "devextreme/viz/palette";
const MyPastel = ?
registerPalette("My Pastel", MyPastel);
Within my component:
<PieChart
dataSource={dataSource}
palette="MyPastel"
>
<Series
argumentField="category"
valueField="value"
>
<Label visible={true} />
</Series>
<Legend visible={true} />
</PieChart>
How can I accomplish this?
I have attempted using computedStyle and other mapping methods but without success.