...
/Creating forecast graph in weather app
Creating forecast graph in weather app
We'll use our knowledge of React.js and Plotly.js to create a plot component that will show the weather forecast.
We'll cover the following...
Now that we’ve our Plot component ready, we just need to pass in the weather data and we are done.
The problem is that we need the data for the x-axis and the y-axis to be separate, but the data we get from the OpenWeatherMap API doesn’t make that distinction. This means we need to shape our data a little bit to suit our needs. What we want is human readable dates on the x-axis, and the degrees at that time on the y-axis!
We’ll ...