Skip to content

Commit

Permalink
Create EnrollGraphContainer.js
Browse files Browse the repository at this point in the history
  • Loading branch information
clarej12 authored May 22, 2024
1 parent 54e0cdf commit a3ca284
Showing 1 changed file with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import React from "react";
import {
LineChart,
Line,
XAxis,
YAxis,
CartesianGrid,
Tooltip,
ResponsiveContainer,
} from "recharts";
import data from "./enrollData.js";

export default function EnrollGraphContainer() {
return (
<ResponsiveContainer width="100%" height={400}>
<LineChart
width={500}
height={300}
data={data}
margin={{
top: 5,
right: 30,
left: 20,
bottom: 5,
}}
>
<CartesianGrid strokeDasharray="3 3" />
<XAxis dataKey="name" dy={5} fontSize="1.1rem" />
<YAxis fontSize="1.1rem" unit="%" />
<Tooltip />
<Line
type="monotone"
dataKey="percent of women enrolled"
stroke="#8884d8"
activeDot={{ r: 4 }}
unit="%"
/>
</LineChart>
</ResponsiveContainer>
);
}

0 comments on commit a3ca284

Please sign in to comment.