aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reports/Graph.js
diff options
context:
space:
mode:
Diffstat (limited to 'modern/src/reports/Graph.js')
-rw-r--r--modern/src/reports/Graph.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/modern/src/reports/Graph.js b/modern/src/reports/Graph.js
index b785e06f..990eb5d5 100644
--- a/modern/src/reports/Graph.js
+++ b/modern/src/reports/Graph.js
@@ -1,9 +1,8 @@
import React from 'react';
-import { Box, Paper } from '@material-ui/core';
+import { withWidth } from '@material-ui/core';
import {LineChart, Line, XAxis, YAxis, CartesianGrid, Tooltip, Legend, ResponsiveContainer } from 'recharts';
const CustomizedAxisTick = ({ x, y, payload }) =>{
- console.log('inside customized tick ', payload.value)
if(!payload.value) {
return payload.value;
}
@@ -19,7 +18,7 @@ const CustomizedAxisTick = ({ x, y, payload }) =>{
const Graph = ({ type, items }) => {
return (
- <ResponsiveContainer height={400} width={500}>
+ <ResponsiveContainer height={400} width="100%" debounce={1}>
<LineChart data={items}>
<XAxis dataKey="fixTime" tick={<CustomizedAxisTick/>} height={60} />
<YAxis />
@@ -32,4 +31,4 @@ const Graph = ({ type, items }) => {
);
}
-export default Graph;
+export default withWidth()(Graph);