Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

d3.js learning

Public visualization

Viewing a saved revision (read-only)

d19b8a0d7cdc484a851d4cf777fb7461

d3.js learning

1 star2🌍 Public
Ssafdarawan
Last edited May 31, 2020
Created on May 31, 2020
Forked from d3.js learning

This example shows a stacked bar chart of fruit consumption over time, using d3.v3 with SVG rendering and React integration. The visualization displays four categories (redDelicious, mcintosh, oranges, and pears) as stacked layers, with a tooltip revealing individual segment values on mouseover. The code uses d3.layout.stack() to transpose data, d3.time.format for year parsing, and d3.svg.axis for both x and y axes, building the chart with svg rect elements and a custom legend.

AI-generated description

A bare minimum HTML page.

See also React Starter.