Export Code

task2_q1

badiniswetha

0 views in last 90 days
Last edited Apr 06, 2025
Created on Apr 04, 2025
Forked from Hello VizHub

D3.js Stacked Bar Chart - Agricultural Data

Overview

This project visualizes agricultural trade data using a stacked bar chart created with D3.js.

Files

  • index.html - Main file containing the D3.js visualization.
  • style.css - Styles for the visualization.
  • README.md - Instructions on how to use the project.
  • Export.csv - The dataset (source file).

Setup & Usage

  1. Open index.html in a web browser.
  2. The stacked bar chart will display Import, Export, Production, and Consumption over the years.
  3. The colors represent different categories:
    • Blue: Import
    • Orange: Export
    • Green: Production
    • Red: Consumption

Dependencies

  • D3.js (included via CDN)

Customization

  • Modify the data array in index.html to use a different dataset.
  • Update style.css to change the chart appearance.

Preview

Stacked Bar Chart (Add a screenshot here)

License

This project is free to use and modify.


Enjoy exploring data with D3.js! 🚀

MIT Licensed