Expenses chart component

Solution retrospective
Chart is done using canvas, was harder to do than i expected, but it is working, even though it is a bit messy.
Please log in to post a comment
Log in with GitHubCommunity feedback
- @Cats-n-coffee
Hi Kamil!
Your solution looks good but I can't see the chart (using FF)! There is an error in the console
this.data is undefined
which shows the stack trace fromgenerateBars
. I'm not sure if it's becausethis.data
is inside an async function and the result needs to be awaited when using it (or run the next step inside the.then()
). I wonder if theload
event is finished before you get the result of theloadData
function since they seem to run in "parallel"? Your code looks clean, would love to see this canvas work!
Join our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord