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:
- Randomize Data: Generate new random values for all bars
- Sort By Value: Arrange bars from highest to lowest value
- Reset Data: Return to the initial values
The chart is responsive and will adapt to different screen sizes.