fix dashboards and add empty state
This commit is contained in:
@@ -17,22 +17,26 @@ export const Pie: FC<Props> = ({title, data}) => {
|
||||
style={{ height: '36rem', width: '36rem' }}
|
||||
>
|
||||
<h3 className="text-lg leading-6 font-medium text-gray-900">{title}</h3>
|
||||
<ResponsivePie
|
||||
data={data}
|
||||
margin={{top: 40, right: 80, bottom: 80, left: 80}}
|
||||
innerRadius={0.5}
|
||||
padAngle={0.7}
|
||||
cornerRadius={3}
|
||||
activeOuterRadiusOffset={8}
|
||||
borderWidth={1}
|
||||
borderColor={{from: 'color', modifiers: [['darker', 0.2]]}}
|
||||
arcLinkLabelsSkipAngle={10}
|
||||
arcLinkLabelsTextColor="#333333"
|
||||
arcLinkLabelsThickness={2}
|
||||
arcLinkLabelsColor={{from: 'color'}}
|
||||
arcLabelsSkipAngle={10}
|
||||
arcLabelsTextColor={{from: 'color', modifiers: [['darker', 2]]}}
|
||||
/>
|
||||
{data.length ? (
|
||||
<ResponsivePie
|
||||
data={data}
|
||||
margin={{top: 40, right: 80, bottom: 80, left: 80}}
|
||||
innerRadius={0.5}
|
||||
padAngle={0.7}
|
||||
cornerRadius={3}
|
||||
activeOuterRadiusOffset={8}
|
||||
borderWidth={1}
|
||||
borderColor={{from: 'color', modifiers: [['darker', 0.2]]}}
|
||||
arcLinkLabelsSkipAngle={10}
|
||||
arcLinkLabelsTextColor="#333333"
|
||||
arcLinkLabelsThickness={2}
|
||||
arcLinkLabelsColor={{from: 'color'}}
|
||||
arcLabelsSkipAngle={10}
|
||||
arcLabelsTextColor={{from: 'color', modifiers: [['darker', 2]]}}
|
||||
/>
|
||||
) : (
|
||||
<div className='grid items-center text-center h-full'>Não existem dados disponíveis.</div>
|
||||
)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user