File tree 1 file changed +24
-23
lines changed
1 file changed +24
-23
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import * as React from 'react';
2
2
import { IStatsApplications } from '../../config' ;
3
3
4
4
import {
5
+ ResponsiveContainer ,
5
6
LineChart ,
6
7
Line ,
7
8
XAxis ,
@@ -22,29 +23,29 @@ const StatsApplicationsGraph: React.FC<IStatsApplicationsGraph> = (props) => {
22
23
23
24
// cannot use ResponsiveContainer since parent has no width and height
24
25
return (
25
- < LineChart
26
- width = { 700 }
27
- height = { 300 }
28
- data = { applications }
29
- margin = { {
30
- top : 5 ,
31
- right : 30 ,
32
- left : 20 ,
33
- bottom : 5
34
- } }
35
- >
36
- < CartesianGrid strokeDasharray = "3 3 " />
37
- < XAxis dataKey = "date" />
38
- < YAxis />
39
- < Tooltip />
40
- < Legend />
41
- < Line
42
- type = "monotone "
43
- dataKey = "applications "
44
- stroke = "#8884d8"
45
- activeDot = { { r : 8 } }
46
- / >
47
- </ LineChart >
26
+ < ResponsiveContainer width = "100%" height = { 300 } >
27
+ < LineChart
28
+ data = { applications }
29
+ margin = { {
30
+ top : 5 ,
31
+ right : 30 ,
32
+ left : 20 ,
33
+ bottom : 5
34
+ } }
35
+ >
36
+ < CartesianGrid strokeDasharray = "3 3" / >
37
+ < XAxis dataKey = "date " />
38
+ < YAxis />
39
+ < Tooltip />
40
+ < Legend />
41
+ < Line
42
+ type = "monotone"
43
+ dataKey = "applications "
44
+ stroke = "#8884d8 "
45
+ activeDot = { { r : 8 } }
46
+ />
47
+ </ LineChart >
48
+ </ ResponsiveContainer >
48
49
) ;
49
50
}
50
51
You can’t perform that action at this time.
0 commit comments