Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

LAB5FINAL

Public visualization

Viewing a saved revision (read-only)

165328675ecc47fbbe0432cd6355a489

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