Cl React Graphs

Grid

A grid must be placed inside a Base component.

import {
Base,
Grid,
useWidth,
} from 'cl-react-graph;
const MyComponent = () => {
const [ref, width] = useWidth('90%');
return(
<Base
width={width}
height={200}
title="Grid example">
<Grid
left={0}
height={200}
svgProps={{
'stroke': theme.grey400,
'strokeOpacity': 0.2,
'strokeWidth': 1,
}}
lines={{
vertical: 5,
horizontal: 3,
}}
width={width} />
</Base>
)
};