Viewing a saved revision (read-only)
2140448a12a34545b0a469920244f7ad
ICE6 - Marks and channels
This bar chart shows the total number of wins achieved by various cricket captains, with captain names on the x-axis and win counts on the y-axis. The data is loaded from a CSV file and sorted by wins in descending order, with each bar colored uniquely via a d3.scaleOrdinal. Built with D3 v7, the visualization uses d3.csv for data loading, d3.scaleBand and d3.scaleLinear for axes, and includes interactive hover effects that change bar color through CSS transitions, along with rotated x-axis labels and axis labels for clarity.
AI-generated descriptionI loaded D3.js using the UNPKG CDN to bring in the D3mlibrary. I imported D3 in the script using import from "d3". I created a local ES6 module for reusable code to demonstrate the modular structure. I imported functions from the local ES6 module to be used in the main script. Visualized data using D3.js to demonstrate its power and flexibility in creating dynamic visualizations.