Skip to content

Commit

Permalink
Update readme and clean chart.js up
Browse files Browse the repository at this point in the history
  • Loading branch information
toduyemi committed Mar 19, 2024
1 parent 5924e2e commit c58a061
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@

# learning goals

- practice making api calls to retrieve data
- practice processing data and displaying data
- using promises and async/await to do all of the above
- practice making api requests to public apis to retrieve data
- build generic data parsing functions
- using promises and async/await along with fetch to do all of the above
- build program specific fetch wrapper to increase readability and organization
- build a typesafe program with typescript
- learn and implement a data visualization library: chartjs

# features

- get current forecast
- search cities and postal code worldwide
- select city from auto-complete dropdown
- display current forecast
- display 5 day forecast along with highs and lows
- display chart of 5 day forecast with 3hr step

# getting started

Expand Down
2 changes: 1 addition & 1 deletion src/dataCharts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export async function renderChart(forecast: ForecastObj[]) {
formatter: (value, context) => {
const bar = forecast[context.dataIndex];
const words = bar.weather.description.split(' ');
return [words[0], words[1]];
return [...words];
},
},
value: {
Expand Down

0 comments on commit c58a061

Please sign in to comment.