clear code

This commit is contained in:
Hristo Nedelkov 2023-09-16 06:11:23 +03:00
parent 8922170358
commit d70fb531fc
1 changed files with 15 additions and 15 deletions

View File

@ -11,21 +11,21 @@ type UptimeChartProps = {
} }
const UptimeChart = ({ data }: UptimeChartProps) => { const UptimeChart = ({ data }: UptimeChartProps) => {
return ( return (
<ResponsiveContainer > <ResponsiveContainer >
<BarChart <BarChart
data={data} data={data}
style={{ backgroundColor: '#F0F2F5' }} style={{ backgroundColor: '#F0F2F5' }}
> >
<Bar dataKey="pv" barSize={2} fill="#E95460" /> <Bar dataKey="pv" barSize={2} fill="#E95460" />
{/* <XAxis dataKey="name" fontSize={'10px'} width={50} /> */} {/* @NOTE: We can add as many Bar items as we need and use them for each day of the month */}
<Bar dataKey="pa" barSize={2} fill="#E95460" /> <Bar dataKey="pa" barSize={2} fill="#E95460" />
{data[0].name && ( {data[0].name && (
<XAxis dataKey="name" fontSize={'10px'} tickMargin={10} /> <XAxis dataKey="name" fontSize={'10px'} tickMargin={10} />
)} )}
</BarChart> </BarChart>
</ResponsiveContainer> </ResponsiveContainer>
); );
} }
export default UptimeChart export default UptimeChart