Skip to main content
Public

Share visualization

Loading preview…

First Draft Electric Bar Chart

vizhub.com

Shared links may look like this on X, LinkedIn, Slack, and Discord.

Before sharing, review the publishing checklist.

Choose how to deliver this visualization

LinkedIn caption

LinkedIn may not keep text supplied by the share sheet. Copy the caption and paste it into the post if needed. You can tag the VizHub company page when posting.

More options

Embed on a websiteCopy iframe embed code
Download & exportPNG, HTML, source ZIP

First Draft Electric Bar Chart

0
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

Comments

Sign in to join the discussion.

MIT Licensed