Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Renderizando dados com React

Public visualization

Viewing a saved revision (read-only)

4098b678703e4fbfb3da71773908734c

Renderizando dados com React

0 stars1🌍 Public
RRodrigo Zanco
Last edited May 17, 2021
Created on May 17, 2021

This example renders a horizontal striped visualization from a CSS named colors dataset. It uses React to map each row of the CSV data to a `<div>` element whose background color corresponds to the color’s RGB hex value, creating a stacked color bar. The code loads data via `d3.csv`, manages state with React’s `useState` and `useEffect` hooks, and renders the stripes using inline styles rather than SVG. The chart displays 960-pixel-wide stripes, each 4 pixels tall, producing a compact color spectrum.

AI-generated description

Programa que renderiza dados usando React.