import { ResponsiveLine } from "@nivo/line"; import { formatBytes } from "../lib/format.js"; type Frame = { id: string; data: { x: string | number; y: number }[]; }; type GraphProps = { data: Frame[]; }; const Graph = ({ data }: GraphProps) => ( formatBytes(v * 1024 * 53), }} pointSize={10} colors={["#3e8faf", "#c4a7e7", "#f5c276", "#EA9B96", "#EB7092", "#9CCFD8"]} pointBorderWidth={0} pointBorderColor={{ from: "seriesColor" }} pointLabelYOffset={-12} enableSlices={"x"} enableTouchCrosshair={true} useMesh={true} legends={[ { anchor: "bottom-right", direction: "column", translateX: 100, itemWidth: 80, itemHeight: 22, symbolShape: "circle", }, ]} /> ); export default Graph;