Bar Chart Racer App
5/6/2024
Dynamic Racing Bar Charts in Java
Project Overview
A Java library for creating animated bar chart races that visualize ranking changes over time. Perfect for data storytelling and dynamic presentations.
Features
- ๐ Java-powered animations
- ๐ฅ๏ธ Swing/AWT based rendering
- ๐ CSV/JSON data input support
- ๐จ Customizable colors and styles
- โฑ๏ธ Frame-rate control for smooth animations
Installation
- Clone this repository:
git clone https://github.com/Abdullahon2006/bar_chart_racer.git
- Import into your Java project (JDK 8+ required)
Usage
- Prepare your data in CSV or JSON format with time-series values
- Create a
BarRaceConfig
object to set up your animation - Call
BarRaceRenderer.startAnimation()
with your configuration
Example configuration:
BarRaceConfig config = new BarRaceConfig() .setInputFile("data.csv") .setOutputFile("animation.gif") .setFps(30) .setDimensions(800, 600);
Data Format
Your data file should contain:
- One column for time periods
- Additional columns for each category's values Example CSV:
date,Product A,Product B,Product C
2020-01,150,200,90
2020-02,170,180,110
Customization
Control these visual elements:
- Bar colors and spacing
- Time display format
- Value labels and fonts
- Background styling
- Animation speed
Building from Source
Requires Maven:
mvn clean package
Contributing
Pull requests are welcome! Please:
- Fork the repository
- Create a feature branch
- Submit your changes
License
MIT License - see LICENSE file