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%' }} />;
}我想要更改分段切片的颜色,我引用了文档的巧妙性,并添加了
marker: {
color: 'rgba(255,153,51,0.6)',
width: 1
}也是,但不起作用
发布于 2022-02-16 06:26:09
这是数组,
maker.color -> maker.colors
您可以这样做如下所示
marker: {
colors: ['rgb(56, 75, 126)', 'rgb(18, 36, 37)', 'rgb(34, 53, 101)'],
width: 1
}这是演示的消息,
https://stackoverflow.com/questions/71114241
复制相似问题