我已经用梅柱图创建了一个图表,
import { BarChart } from '@mui/x-charts/BarChart';
import { ThemeProvider, createTheme, useTheme } from '@mui/material/styles';
我想让wine 吧变成圆角.我try 了SX属性和Series属性的borderRadius.但这并没有奏效.SX属性在图表周围创建边框,而不是 for each 条形图创建边框. 到目前为止,我有以下代码:
<ThemeProvider theme={darkTheme} >
<BarChart
sx={[{p: 5, border: 1, borderRadius: 3}]}
yAxis={[
{
id: 'barCategories',
data: ['A', 'B', 'C', 'D', 'E'],
scaleType: 'band',
},
]}
series={[
{
data: [50, 20, 85, 60, 20],
color: '#fff',
},
]}
layout="horizontal"
/>
</ThemeProvider>
我怎么才能让wine 吧看起来像这样的圆角: