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) => {
return (
<ResponsiveContainer >
<BarChart
data={data}
style={{ backgroundColor: '#F0F2F5' }}
>
<Bar dataKey="pv" barSize={2} fill="#E95460" />
{/* <XAxis dataKey="name" fontSize={'10px'} width={50} /> */}
<Bar dataKey="pa" barSize={2} fill="#E95460" />
{data[0].name && (
<XAxis dataKey="name" fontSize={'10px'} tickMargin={10} />
)}
</BarChart>
</ResponsiveContainer>
);
return (
<ResponsiveContainer >
<BarChart
data={data}
style={{ backgroundColor: '#F0F2F5' }}
>
<Bar dataKey="pv" barSize={2} fill="#E95460" />
{/* @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" />
{data[0].name && (
<XAxis dataKey="name" fontSize={'10px'} tickMargin={10} />
)}
</BarChart>
</ResponsiveContainer>
);
}
export default UptimeChart