Skip to main content
100%

Renderizando dados com React

✓ Published1🌍 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.

MIT Licensed

Similar vizzes