Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

React Starter

Public visualization

Viewing a saved revision (read-only)

744a84084a7d45e39401088520a6239b

React Starter

0 stars0🌍 Public
Zzdai3
Last edited Jun 18, 2020
Created on Jun 18, 2020
Forked from React Starter

This example demonstrates a minimal React and D3 integration, rendering a static bar chart from a CSV dataset without any interactive features. The visualization displays rectangles of fixed width and height, with a linear scale mapping the maximum numeric value from the data to the scale domain. The code uses React 16.10.0 for the component structure, while D3’s `select`, `csv`, `scaleLinear`, and `max` functions handle SVG selection, data loading, scaling, and value extraction. Rendering is done by appending `<rect>` elements directly to an SVG via D3’s data join, with the CSV rows parsed into numbers before being passed to the render function.

AI-generated description

React Starter code.