Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

LAB5FINAL

Public visualization

LAB5FINAL

0 stars0๐ŸŒ Public
Llimeroc
Last edited May 18, 2021
Created on May 18, 2021

This interactive visualization displays grouped bar charts comparing profit and revenue across seven months, with each month split into colored bars representing revenue categories. Users can drag the top of any bar vertically to modify its value, which immediately updates the displayed profit number and bar height. Built with D3 v5, the example uses `scaleBand`, `scaleOrdinal`, and `scaleLinear` to position and color the bars, while `d3.drag()` handles the interactive manipulation. A color legend, generated by a custom `colorLegend` function, identifies the revenue series, and data comes from a local JSON file rendered as SVG with smooth transitions.

AI-generated description

Comments

Sign in to join the discussion.

MIT Licensed