diff options
author | Galen Guyer <galen@galenguyer.com> | 2020-11-14 14:35:10 -0500 |
---|---|---|
committer | Galen Guyer <galen@galenguyer.com> | 2020-11-14 14:35:10 -0500 |
commit | 223baecd2196a92e86daf475e499c02a66a754b9 (patch) | |
tree | b600891d474aef0af91a2bfe555352f2bdcbace6 /src/History.js | |
parent | a5d05db93017d6bc6727c7bc11deb4a555de315a (diff) |
add links to all stats
Diffstat (limited to 'src/History.js')
-rw-r--r-- | src/History.js | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/History.js b/src/History.js index 1fd39a3..c559d83 100644 --- a/src/History.js +++ b/src/History.js @@ -1,6 +1,17 @@ import { React, PureComponent } from "react"; import { DateTime } from "luxon"; -import { LineChart, Line, CartesianGrid, XAxis, YAxis, Tooltip, ResponsiveContainer, Label } from "recharts"; +import { + BarChart, + Bar, + LineChart, + Line, + CartesianGrid, + XAxis, + YAxis, + Tooltip, + ResponsiveContainer, + Label, +} from "recharts"; const History = (props) => { const offset = DateTime.fromSQL(props.data[0].date, { zone: "UTC" }).setZone(DateTime.local().zoneName).toSeconds(); @@ -10,7 +21,7 @@ const History = (props) => { date: DateTime.fromSQL(d.date, { zone: "UTC" }).setZone(DateTime.local().zoneName).toSeconds(), }; }); - + return ( <> <h3 className="text-3xl">{props.name}</h3> @@ -21,7 +32,7 @@ const History = (props) => { margin={{ top: 15, right: 30, left: 20, bottom: 5 }} data={data} > - <Line type="monotone" dataKey="value" stroke="#8884d8" /> + <Line type="monotone" dataKey="value" stroke="#8884d8" dot={false} /> <CartesianGrid strokeDasharray="3 3" /> <XAxis dataKey="date" |