Chart solved
This commit is contained in:
1 parent
3ece902d57
commit
9940cf9ef5
5 files changed
+363
-74
No files matched your search
@@ -1,18 +1,14 @@
|
||||
import React from "react";
|
||||
import "./barChart.css";
|
||||
|
||||
const BarChart = () => {
|
||||
const data = Array.from({ length: 12 }, () =>
|
||||
Math.floor(Math.random() * 100)
|
||||
);
|
||||
|
||||
const BarChart = ({ checks }) => {
|
||||
return (
|
||||
<div className="bar-chart">
|
||||
{data.map((value, index) => (
|
||||
{checks.map((value, index) => (
|
||||
<div
|
||||
key={index}
|
||||
className={`bar ${index < 6 ? "green" : "red"}`}
|
||||
style={{ height: `${value}%` }}
|
||||
className={`bar ${value.status ? "green" : "red"}`}
|
||||
style={{ height: `${value.responseTime / 3}%` }}
|
||||
/>
|
||||
))}
|
||||
</div>
|
||||
|
||||
Reference in new issue
Block a user