Skip to main content
100%

Fork

✓ Published0🌍 Public
MMark Lam
Last edited Apr 28, 2022
Created on Apr 28, 2022
Forked from D3 React Face

This example visualizes a dataset of news themes and their associated article counts as a treemap. The React application parses a hardcoded object of themes, each containing news items, and uses D3 v7 to build a hierarchy with the `d3.hierarchy` and `d3.treemap` functions. Each theme is represented as a rectangle, sized by `news_count`, and colored via a `d3.scaleOrdinal` scheme. SVG rendering occurs through a selected `svgRef` element, with rectangles colored by category, though the display is incomplete as only a placeholder text is appended.

AI-generated description

A bare minimum HTML page demonstrating use of CSS and JavaScript.

See also React Starter.

MIT Licensed

Similar vizzes