Files
2026-04-01 15:52:53 -07:00

28 lines
583 B
TypeScript

import AutoSizer from 'react-virtualized-auto-sizer'
import Curves from './Curves'
interface ScrollableGraphProps {
compact?: boolean
margin?: {
top: number
right: number
bottom: number
left: number
}
data: any
title?: string
labels?: string[]
note?: string
colors?: any[]
}
export default function ScrollableGraph(props: ScrollableGraphProps) {
return (
<>
{props.data && props.data[0]?.length !== 0 && (
<AutoSizer>{({ width, height }) => <Curves {...props} width={width} height={height} />}</AutoSizer>
)}
</>
)
}