|
@@ -1,5 +1,5 @@
|
|
|
import React from 'react';
|
|
import React from 'react';
|
|
|
-import { LineChart, XAxis, Line, CartesianGrid } from 'recharts';
|
|
|
|
|
|
|
+import { LineChart, XAxis, YAxis, Line, CartesianGrid } from 'recharts';
|
|
|
|
|
|
|
|
import { Cases, Country } from '../types';
|
|
import { Cases, Country } from '../types';
|
|
|
import { getCases } from '../utils/get-cases';
|
|
import { getCases } from '../utils/get-cases';
|
|
@@ -23,6 +23,7 @@ const GraphCases: React.FC<Props> = ({ country }) => {
|
|
|
<h3>Country: {country.toUpperCase()}</h3>
|
|
<h3>Country: {country.toUpperCase()}</h3>
|
|
|
<LineChart width={640} height={480} data={cases} margin={margin}>
|
|
<LineChart width={640} height={480} data={cases} margin={margin}>
|
|
|
<XAxis dataKey="date" label="Date" />
|
|
<XAxis dataKey="date" label="Date" />
|
|
|
|
|
+ <YAxis tick />
|
|
|
<CartesianGrid stroke="#f5f5f5" />
|
|
<CartesianGrid stroke="#f5f5f5" />
|
|
|
<Line type="monotone" dataKey="value" stroke="#000" yAxisId={0} />
|
|
<Line type="monotone" dataKey="value" stroke="#000" yAxisId={0} />
|
|
|
</LineChart>
|
|
</LineChart>
|