Export Image
Export Code

Fork of Fork of HTML Starter

Nita

0 views in last 90 days
Last edited Jul 19, 2025
Created on Jul 19, 2025

Interactive Bar Chart

A responsive and interactive bar chart that displays four colored bars representing different values.

Features

  • Colorful bars with dynamic heights representing values
  • Y-axis with scale labels
  • Interactive buttons:
    • Randomize: Generate random data values
    • Sort: Sort bars by value (highest to lowest)
    • Reset: Return to the initial data values
  • Smooth animations when values change
  • Responsive design that works on different screen sizes

Improvements

  • Added color gradient to bars for a modern look
  • Added proper axis labeling
  • Added sorting functionality
  • Added smoother animations with bounce effect
  • Improved mobile responsiveness
  • Added CSS variables for easier theming
  • Improved overall styling with shadows and rounded corners

Usage

Open index.html in a browser to view the chart. Use the interactive buttons to:

  1. Randomize Data: Generate new random values for all bars
  2. Sort By Value: Arrange bars from highest to lowest value
  3. Reset Data: Return to the initial values

The chart is responsive and will adapt to different screen sizes.

MIT Licensed