Skip to main content
Public

Share visualization

Loading preview…

Fork of Electric Bar Chart Using d3.stack

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

Fork of Electric Bar Chart Using d3.stack

0
Ssrividyamadas@gmail.com
Last edited Mar 28, 2024
Created on Mar 28, 2024

This visualization displays the revenue of ten selected Indian states from 2020 to 2024 as an overlapping area chart, with each state’s trend represented by a semi-transparent colored band. The code loads CSV data via `d3.text`, filters it to the desired states, and constructs the chart using the D3 v7 `d3.area()` generator with `d3.scaleLinear` for both axes. SVG rendering includes `d3.axisBottom` and `d3.axisLeft` for the year and revenue scales, while a legend lists each state with its matching color from `d3.scaleOrdinal(d3.schemeCategory10)`. The chart sources data from a GitHub gist and is rendered entirely in SVG.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed