🌍 Public
Viewing a saved revision (read-only)
28266e46a8d3433ba1e150e1529a598b
Fork
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 descriptionA bare minimum HTML page demonstrating use of CSS and JavaScript.
See also React Starter.