Open tduraes opened 3 years ago
I found that we have to give inline CSS I don't know why but it works.
change scr/chart/Chart.jsx in line 74 (return statement)
return ( <div className={styles.container} style={{ width: '100%' }}> {country ? barChart : lineChart} </div> ); };
I hope it will work for you>
hey, so im tryying to implement this solution but i cant seem to figure out how to make the charts larger here's chart.jsx
`import React, {useState, useEffect } from 'react'; import {fetchDailyData} from '../../api'; import { Line, Bar } from 'react-chartjs-2';
import styles from './Chart.module.css';
const Chart = ({data:{confirmed, recovered, deaths}, country}) => { const [dailyData, setDailyData] =useState([]);
}
export default Chart;`
here's Chart.module.css
.containter { display: flex; justify-content: center; width: 85%; }
hope you can help me , thanks for the amazing work man !