An open API service indexing awesome lists of open source software.

https://github.com/haquanq-frontendmentor/expenses-chart-component

Solution for frontendmentor.io challenge: expense-chart-component
https://github.com/haquanq-frontendmentor/expenses-chart-component

accessibility bem-css frontendmentor frontendmentor-junior html postcss

Last synced: 18 days ago
JSON representation

Solution for frontendmentor.io challenge: expense-chart-component

Awesome Lists containing this project

README

          

## Frontend Mentor - Expenses Chart Component Solution

This is a solution to the [Expenses chart component challenge on Frontend Mentor](https://www.frontendmentor.io/challenges/expenses-chart-component-e7yJBUdjwt). Frontend Mentor challenges help you improve your coding skills by building realistic projects.



Solution post


Live demo


![](./docs/preview.jpg)

## Table of Contents

- [Project Overview](#sunrise-project-overview)
- [Tech Stack and Approach](#stars-tech-stack-and-approach)
- [Local Development](#leaves-local-development)
- [Deployment](#maple_leaf-deployment)

## :sunrise: Project Overview

### Challenge Requirements

- 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

### Status

Features

- [x] Accessible bar charts with keyboard navigation

Accessibility

- [x] Responsive accross different screen sizes
- [x] Interactive elements have clear focus indicator

## :stars: Tech Stack and Approach

### Built With

- **HTML5** – Semantic structure
- **CSS Grid & Flexbox** – Layout
- **PostCSS** – Nested rules, custom media queries, future CSS features, minification
- **Stylelint** – CSS linting, code style consistency
- **TypeScript** - Interactivity and application logic
- **Vite** - Fast development server, production build and easy configuration

### Approach

- Mobile-first workflow for better performance on smaller devices
- Accessibility guided by [ARIA Authoring Practices Guide (APG)](https://www.w3.org/WAI/ARIA/apg/)

## :leaves: Local Development

### Prerequisites

Install the following:

- Git (latest version)
- Node.js (latest LTS recommended)
- pnpm (latest version)

### Setup

```
git clone https://github.com/haquanq-frontendmentor/expenses-chart-component.git
cd expenses-chart-component
pnpm install
```

### Start Development Server

```
pnpm dev
```

## :maple_leaf: Deployment

Deployed to Github Pages via Github Action.