Skip to main content
100%

Bar chart

✓ Published1🌍 Public
GGeolffrey S Mena
Last edited Sep 7, 2019
Created on Sep 7, 2019
Forked from Bar chart

This example shows a horizontal bar chart comparing the "population" values of four crews across three categories: State, Stop, and Idle. The visualization displays the data from the provided `data.csv` file, with each bar’s length representing the numeric population value. Using the D3.js library (version 5.11.0), the code employs `scaleTime` for the x-axis and `scaleBand` for the y-axis, along with `axisLeft` and `axisBottom` to render the chart’s axes. The bars are drawn as rectangles with a fixed green fill, and the data is loaded asynchronously via `csv('data.csv')`. The rendering is delivered as an SVG element within an HTML page.

AI-generated description
MIT Licensed

Similar vizzes