Skip to main content
100%

First Draft Electric Bar Chart

✓ Published0🌍 Public
PPeter Cordone
Last edited Sep 28, 2021
Created on Sep 28, 2021

This bar chart visualizes monthly electricity usage across multiple utility accounts, with bars colored by account number and highlighted in orange on hover. The chart is rendered with SVG using D3.js v6, employing `scaleBand` and `scaleLinear` for axes and positioning. It reads data from a CSV file via `d3.csv` and includes interactivity through D3’s `.on("mouseover")` and `.on("mouseout")` event handlers. Axis labels are added manually, while a legend is positioned within the SVG group, and transitions animate the bar color changes on mouseout.

AI-generated description
MIT Licensed

Similar vizzes