style chart

This commit is contained in:
Hristo Nedelkov 2023-09-15 13:06:49 +03:00
parent 05d0a18947
commit 9173d42611
2 changed files with 7 additions and 6 deletions

View File

@ -17,9 +17,11 @@ const ConsensusUptimeCard = () => {
<Text size={27} weight={'semibold'}>98%</Text> <Text size={27} weight={'semibold'}>98%</Text>
<Text size={13} color='$red'>-2%</Text> <Text size={13} color='$red'>-2%</Text>
</XStack> </XStack>
<Stack width={'100%'} height={'50%'}> <XStack width={'100%'} height={'50%'} justifyContent="center" alignItems="center">
<Stack style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', width: '80%', height: '100%' }}>
<UptimeChart /> <UptimeChart />
</Stack> </Stack>
</XStack>
</YStack> </YStack>
</Shadow > </Shadow >

View File

@ -55,10 +55,8 @@ interface DataItem {
const UptimeChart = () => { const UptimeChart = () => {
return ( return (
<ResponsiveContainer width="100%" height="100%"> <ResponsiveContainer >
<BarChart <BarChart
width={500}
height={300}
data={data} data={data}
margin={{ margin={{
top: 5, top: 5,
@ -66,6 +64,7 @@ const UptimeChart = () => {
left: 20, left: 20,
bottom: 5, bottom: 5,
}} }}
style={{ backgroundColor: '#F0F2F5' }}
> >
<Bar dataKey="pv" barSize={2} fill="#E95460" /> <Bar dataKey="pv" barSize={2} fill="#E95460" />
</BarChart> </BarChart>