@@ -7,6 +7,7 @@ import "./CodeApp.css";
77import Charts from "./Charts" ;
88import Map from "./Map/Map" ;
99import DisplayTable from "./Table/DisplayTable" ;
10+ import TinyCharts from "./TinyCharts" ;
1011
1112const styles = {
1213 root : {
@@ -73,6 +74,33 @@ const styles = {
7374 fontSize : "3rem" ,
7475 // textTransform: "uppercase",
7576 } ,
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+ } ,
76104} ;
77105
78106const stateCodes = {
@@ -226,10 +254,52 @@ class CovidApp extends Component {
226254 < div > </ div >
227255 </ div >
228256 < 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 >
233303 < Charts
234304 data = { this . state . completeData }
235305 isLoading = { this . state . isLoading }
0 commit comments