CleverProgrammers / react-covid-tracker

202 stars 252 forks source link

Graph behaves weird when select info recovered box #24

Closed sohailshams closed 3 years ago

sohailshams commented 3 years ago

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.

Ansukun commented 3 years ago

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

sohailshams commented 3 years ago

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);
kamal-choudhary commented 3 years ago

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