clear code
This commit is contained in:
parent
8922170358
commit
d70fb531fc
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue