Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Untitled

Public visualization

Untitled

0 stars0🌍 Public
ZZeno
Last edited Apr 26, 2020
Created on Apr 26, 2020
Forked from Victory!

This example displays a bar chart of confirmed COVID-19 cases across ten countries, using data loaded from a local CSV file. The React app fetches the data with the D3 `csv` function inside a `useEffect` hook and stores it in state via `useState`. Victory Charts’ `VictoryChart` and `VictoryBar` components render the bars, mapping the `country` field to the x-axis and `confirmed` to the y-axis. The chart is styled with custom tick label font sizes and padding, all within an 960x500 viewport.

AI-generated description

This example shows how to load data from a CSV file using React hooks and visualize the result using Victory Charts. Inspired by this Victory example from Swizec Teller in React for Data Visualization.

Comments

Sign in to join the discussion.

MIT Licensed