Skip to main content
๐ŸŒ Public

Share visualization

Send this visualization to others.

Fork of ICE-6: Rendering Marks and Channels with React & D3

Public visualization

Fork of ICE-6: Rendering Marks and Channels with React & D3

0 stars1๐ŸŒ Public
KKolliTeja
Last edited Mar 6, 2022
Created on Mar 6, 2022

This example shows a horizontal bar chart of the top 20 countries by COVID-19 cases, using data from a CSV file loaded via `d3.csv`. The visualization maps country names to the y-axis with `d3.scaleBand` and case counts to the x-axis with `d3.scaleLinear`, rendering blue bars as SVG `<rect>` elements. The React component manages state with `useState` and `useEffect`, while D3 handles scaling and tick generation for both axes. The code demonstrates a hybrid approach where React renders marks and channels, and D3 provides the underlying scales and data processing.

AI-generated description

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

See also React Starter.

Comments

Sign in to join the discussion.

MIT Licensed