import Plotly from "plotly.js";
import createPlotlyComponent from "react-plotly.js/factory";
export const Plot = createPlotlyComponent(Plotly);
export function PieChart() {
return <Plot data={data} layout={layout} config={{ displaylogo: false }} useResizeHandler={true} style={{ width: '100%' }} />;
}
I want to change the color of Piechart slices, I referred to the documentation of plotly and added
marker: {
color: 'rgba(255,153,51,0.6)',
width: 1
}
too but it's not working
This is array,
maker.color
-->maker.colors
You can do this as below
Here is DEMO for this,