@@ -12,6 +12,7 @@ import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
12
12
import { faSyncAlt } from "@fortawesome/free-solid-svg-icons" ;
13
13
import "../styles/DarkModeButton.css" ;
14
14
import MapSection from "./MapSection" ;
15
+ import Barchart from "./Barchart" ;
15
16
16
17
class CovidApp extends Component {
17
18
constructor ( props ) {
@@ -140,65 +141,70 @@ class CovidApp extends Component {
140
141
isDarkMode = { isDarkMode }
141
142
/>
142
143
</ div >
143
- < div > </ div >
144
144
</ div >
145
+ { /* <Barchart
146
+ data={this.state.data}
147
+ isLoading={this.state.isLoading}
148
+ dataKey="confirmed"
149
+ stroke={colors.red}
150
+ /> */ }
145
151
< div className = { classes . chartArea } >
146
152
< div className = { classes . tinyChartArea } >
147
153
< div className = { classes . tinyChart } >
148
154
< div
149
155
className = { classes . tinych }
150
156
style = { { background : "rgba(249, 52, 94,.1)" } }
151
157
>
152
- < TinyCharts
158
+ < h3 style = { { color : colors . red } } > confirmed</ h3 >
159
+ < Barchart
153
160
data = { this . state . data }
154
161
isLoading = { this . state . isLoading }
155
162
dataKey = "confirmed"
156
163
stroke = { colors . red }
157
164
/>
158
165
</ div >
159
- < h3 style = { { color : colors . red } } > confirmed</ h3 >
160
166
</ div >
161
167
< div className = { classes . tinyChart } >
162
168
< div
163
169
className = { classes . tinych }
164
170
style = { { background : "rgba(250, 100, 0,.1)" } }
165
171
>
166
- < TinyCharts
172
+ < h3 style = { { color : colors . orange } } > active</ h3 >
173
+ < Barchart
167
174
data = { this . state . data }
168
175
isLoading = { this . state . isLoading }
169
176
dataKey = "active"
170
177
stroke = { colors . orange }
171
178
/>
172
179
</ div >
173
- < h3 style = { { color : colors . orange } } > active</ h3 >
174
180
</ div >
175
181
< div className = { classes . tinyChart } >
176
182
< div
177
183
className = { classes . tinych }
178
184
style = { { background : "rgba(28, 177, 66,.1)" } }
179
185
>
180
- < TinyCharts
186
+ < h3 style = { { color : colors . green } } > Recovered</ h3 >
187
+ < Barchart
181
188
data = { this . state . data }
182
189
isLoading = { this . state . isLoading }
183
190
dataKey = "discharged"
184
191
stroke = { colors . green }
185
192
/>
186
193
</ div >
187
- < h3 style = { { color : colors . green } } > Recovered</ h3 >
188
194
</ div >
189
195
< div className = { classes . tinyChart } >
190
196
< div
191
197
className = { classes . tinych }
192
198
style = { { background : "rgba(98, 54, 255,.1)" } }
193
199
>
194
- < TinyCharts
200
+ < h3 style = { { color : colors . purple } } > Deceased</ h3 >
201
+ < Barchart
195
202
data = { this . state . data }
196
203
isLoading = { this . state . isLoading }
197
204
dataKey = "deaths"
198
205
stroke = { colors . purple }
199
206
/>
200
207
</ div >
201
- < h3 style = { { color : colors . purple } } > Deceased</ h3 >
202
208
</ div >
203
209
</ div >
204
210
< Charts data = { this . state . data } isLoading = { this . state . isLoading } />
0 commit comments