@@ -7,6 +7,7 @@ import "./CodeApp.css";
7
7
import Charts from "./Charts" ;
8
8
import Map from "./Map/Map" ;
9
9
import DisplayTable from "./Table/DisplayTable" ;
10
+ import TinyCharts from "./TinyCharts" ;
10
11
11
12
const styles = {
12
13
root : {
@@ -73,6 +74,33 @@ const styles = {
73
74
fontSize : "3rem" ,
74
75
// textTransform: "uppercase",
75
76
} ,
77
+
78
+ tinyChartArea : {
79
+ display : "flex" ,
80
+ flexWrap : "wrap" ,
81
+ padding : "2rem" ,
82
+ // flexDirection: "column",
83
+ justifyContent : "space-around" ,
84
+ alignItems : "center" ,
85
+ marginTop : "3rem" ,
86
+ } ,
87
+ tinyChart : {
88
+ margin : "2rem" ,
89
+ // padding: "2rem",
90
+ "& h3" : {
91
+ textTransform : "capitalize" ,
92
+ fontWeight : 500 ,
93
+
94
+ textAlign : "center" ,
95
+ } ,
96
+ } ,
97
+ tinych : {
98
+ backgroundColor : "rgba(129, 124, 155, 0.05)" ,
99
+ // boxShadow: "0 1.5rem 2.5rem rgba(#6236FF 0.05)",
100
+ borderRadius : "2rem" ,
101
+ marginBottom : "2rem" ,
102
+ padding : "2rem" ,
103
+ } ,
76
104
} ;
77
105
78
106
const stateCodes = {
@@ -226,10 +254,52 @@ class CovidApp extends Component {
226
254
< div > </ div >
227
255
</ div >
228
256
< div className = { classes . chartArea } >
229
- < Charts
230
- data = { this . state . completeData }
231
- isLoading = { this . state . isLoading }
232
- />
257
+ < div className = { classes . tinyChartArea } >
258
+ < div className = { classes . tinyChart } >
259
+ < div className = { classes . tinych } >
260
+ < TinyCharts
261
+ data = { this . state . completeData }
262
+ isLoading = { this . state . isLoading }
263
+ dataKey = "confirmed"
264
+ stroke = { colors . red }
265
+ />
266
+ </ div >
267
+ < h3 style = { { color : colors . red } } > confirmed</ h3 >
268
+ </ div >
269
+ < div className = { classes . tinyChart } >
270
+ < div className = { classes . tinych } >
271
+ < TinyCharts
272
+ data = { this . state . completeData }
273
+ isLoading = { this . state . isLoading }
274
+ dataKey = "active"
275
+ stroke = { colors . orange }
276
+ />
277
+ </ div >
278
+ < h3 style = { { color : colors . orange } } > active</ h3 >
279
+ </ div >
280
+ < div className = { classes . tinyChart } >
281
+ < div className = { classes . tinych } >
282
+ < TinyCharts
283
+ data = { this . state . completeData }
284
+ isLoading = { this . state . isLoading }
285
+ dataKey = "discharged"
286
+ stroke = { colors . green }
287
+ />
288
+ </ div >
289
+ < h3 style = { { color : colors . green } } > Recovered</ h3 >
290
+ </ div >
291
+ < div className = { classes . tinyChart } >
292
+ < div className = { classes . tinych } >
293
+ < TinyCharts
294
+ data = { this . state . completeData }
295
+ isLoading = { this . state . isLoading }
296
+ dataKey = "deaths"
297
+ stroke = { colors . purple }
298
+ />
299
+ </ div >
300
+ < h3 style = { { color : colors . purple } } > Deceased</ h3 >
301
+ </ div >
302
+ </ div >
233
303
< Charts
234
304
data = { this . state . completeData }
235
305
isLoading = { this . state . isLoading }
0 commit comments