CleverProgrammers / react-covid-tracker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Graph behaves weird when select info recovered box

sohailshams opened this issue · comments

recover cases graph
Hi Guys, when I click on recovered cased my graph goes into -ve y axis as shown in the image. However when I click on cases and deaths it appears fine. Anyone faced the same issue ? I double checked the code with source code and it seems identical. Can anyone help to find out what is wrong here.

hey can you help me My map isnot zooming to the countries when I select the puticular coutry from menu

change your Map.js to following code;
function ChangeMapView({ coords, zoom }) {
const map = useMap();
map.setView([coords.lat, coords.lng], zoom);

return null;
}

function Map({ countries, casesType, center, zoom }) {
return (





{showDataOnMap(countries, casesType)}


);
}

export default Map;
and in App.js in onCountryChange add following code.
const {
countryInfo: { lat, long },
} = data;
setMapCenter({ lat, lng: long });

    setMapZoom(4);

Were you able to solve this issue? I am also facing the same problem.