mirror of
https://github.com/status-im/nimbus-gui.git
synced 2025-02-18 22:37:39 +00:00
Update UptimeChart to take props from parent
This commit is contained in:
parent
1add11de03
commit
0e53d9bb78
@ -1,44 +1,6 @@
|
||||
|
||||
import { BarChart, Bar, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts';
|
||||
// @NOTE: XAxis for months or days
|
||||
const data: DataItem[] = [
|
||||
{
|
||||
// @NOTE: if you want to add name in the XAxis. You need to set the names here
|
||||
// name: 'Jan',
|
||||
pv: 1,
|
||||
pa: 1,
|
||||
},
|
||||
{
|
||||
// name: 'Feb',
|
||||
pv: 0,
|
||||
pa: 0
|
||||
},
|
||||
{
|
||||
//name: 'Feb',
|
||||
pv: 1,
|
||||
pa: 0
|
||||
},
|
||||
{
|
||||
//name: 'Feb',
|
||||
pv: 0,
|
||||
pa: 0
|
||||
},
|
||||
{
|
||||
//name: 'Feb',
|
||||
pv: 0,
|
||||
pa: 0
|
||||
},
|
||||
{
|
||||
//name: 'Feb',
|
||||
pv: 1,
|
||||
pa: 1
|
||||
},
|
||||
{
|
||||
//name: 'Feb',
|
||||
pv: 1,
|
||||
pa: 1
|
||||
},
|
||||
];
|
||||
|
||||
interface DataItem {
|
||||
name?: string;
|
||||
@ -46,7 +8,11 @@ interface DataItem {
|
||||
pv: number;
|
||||
}
|
||||
|
||||
const UptimeChart = () => {
|
||||
type UptimeChartProps = {
|
||||
data: DataItem[];
|
||||
}
|
||||
|
||||
const UptimeChart = ({ data }: UptimeChartProps) => {
|
||||
return (
|
||||
<ResponsiveContainer >
|
||||
<BarChart
|
||||
|
Loading…
x
Reference in New Issue
Block a user