doc: add props to LineGraph

This commit is contained in:
Leon Xu committed 2022-05-03 21:47:05 -07:00
1 parent 3174917a25
commit a85c69285f
1 file changed
+3 -3
+3 -3
View File
@@ -63,7 +63,7 @@ const buildChartData = (data, casesType) => {
return chartData;
};
function LineGraph({ casesType }) {
function LineGraph({ casesType, ...props }) {
const [data, setData] = useState({});
useEffect(() => {
@@ -82,9 +82,10 @@ function LineGraph({ casesType }) {
}, [casesType]);
return (
<div>
<div className={props.className}>
{data?.length > 0 && (
<Line
options={options}
data={{
datasets: [
{
@@ -94,7 +95,6 @@ function LineGraph({ casesType }) {
},
],
}}
options={options}
/>
)}
</div>