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}
x={{
height: 1,
style: {
stroke: "#eee",
strokeDasharray: "2 2",
fill: theme.grey400,
},
ticks: 5,
visible: true,
}}
y={{
style: {
stroke: "#eee",
fill: theme.grey400,
},
ticks: 10,
visible: true,
}}
width={width}
/>
</Base>
)
};