This is a solution to the Expenses chart component challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Users should be able to:
- View the bar chart and hover over the individual bars to see the correct amounts for each day
- See the current day’s bar highlighted in a different colour to the other bars
- View the optimal layout for the content depending on their device’s screen size
- See hover states for all interactive elements on the page
- Bonus: Use the JSON data file provided to dynamically size the bars on the chart
- Solution URL:
- Live Site URL: Add live site URL here
I first designed the html and css outside parts. Let me explain it a bit. The app kind has one main with two articles separated in between. The second one which is the bigger one has the chart. I did the styling very fast and then came the using of the data through map method in javascript. I was then able to map the item elements of the data while adding classes to their dates and data in terms of div width size.
I got stuck in adding hover state for the class elements.
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- CSS Grid
- Mobile-first workflow
- Vanilla Js
Use this section to recap over some of your major learnings while working through this project. Writing these out and providing code samples of areas you want to highlight is a great way to reinforce your own knowledge.
To see how you can add code snippets, see below:
I would really love to know sass and be able to style the chart. I didn't want to overstay on this challenge and kind of move forward and come back later to practice more sass skills after learning it.
- Website - Add your name here
- Frontend Mentor - @yourusername
- Twitter - @yourusername