diff --git a/src/components/Barchart.js b/src/components/Barchart.js index ce7d797..edc4d78 100644 --- a/src/components/Barchart.js +++ b/src/components/Barchart.js @@ -1,18 +1,9 @@ import React, { Component } from "react"; -import { - BarChart, - Bar, - XAxis, - YAxis, - Tooltip, - ResponsiveContainer, -} from "recharts"; -import { withStyles } from "@material-ui/styles"; -import styles from "../styles/BarchartStyles"; +import { BarChart, Bar, XAxis, YAxis, Tooltip } from "recharts"; -class Barchart extends Component { +export default class Barchart extends Component { render() { - const { data, isLoading, dataKey, stroke, classes } = this.props; + const { data, isLoading, dataKey, stroke } = this.props; let result; try { const updatedData = data.slice(1).slice(-50); @@ -35,25 +26,21 @@ class Barchart extends Component { } catch (err) {} return ( -
- - {!isLoading && ( - - - - - - - )} - +
+ {!isLoading && ( + + + + + + + )}
); } } - -export default withStyles(styles)(Barchart); diff --git a/src/styles/BarchartStyles.js b/src/styles/BarchartStyles.js deleted file mode 100644 index dea98a7..0000000 --- a/src/styles/BarchartStyles.js +++ /dev/null @@ -1,6 +0,0 @@ -export default { - barcharts: { - width: "100%", - height: "17rem", - }, -};