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 stars0🌍 Public
NNeeharikaGali
Last edited Mar 11, 2023
Created on Mar 11, 2023

This example shows a horizontal bar chart of city temperatures, using React to render SVG marks and D3 to compute scales. It loads city data from a CSV file, slices the first 15 rows, and maps each city’s `Basic_length` value to a bar’s width. The code uses `d3.csv` for parsing, `d3.scaleBand` for the y-axis, `d3.scaleLinear` for the x-axis, and `d3.max` for domain calculation. Grid lines and axis ticks are drawn manually with SVG elements, while React’s `useEffect` and `useState` manage asynchronous data loading.

AI-generated description

A bare minimum HTML page.

Comments

Sign in to join the discussion.

MIT Licensed