Live demo (GitHub Pages): https://saharij.github.io/table-test-task/
This project implements an interactive matrix table. The UI generates a matrix of random 3‑digit values and supports live statistics and interactions such as nearest‑value highlighting and row percentage heatmaps.
- The table is generated automatically on first render using the default values.
- Changing Rows (M) or Columns (N) enables the Generate button.
- Click Generate to rebuild the matrix with the new size.
- Click any cell to increase its value by 1.
- Row sums and percentile values update immediately.
- Hover any cell to highlight the X nearest values in the entire matrix.
- X is controlled by the Nearest cells (X) input.
- Hover a Sum cell to switch that row into percentage mode.
- Each cell shows its percent of the row total.
- A heatmap background represents the cell value relative to the max in that row.
- Delete row: Click the delete icon in the row header.
- Add row: Click Add row to append a new row using the current column count.
- M (Rows): number of rows (0–100)
- N (Columns): number of columns (0–100)
- X (Nearest cells): number of nearest values to highlight (0–M×N)
The table includes:
- A Sum column for each row
- A 60th percentile row for each column
- React + TypeScript
- React Context for state management
- No external UI libraries
Clone the project and run these commands in the terminal
npm install
npm run dev