Skip to main content
🌍 Public

Share visualization

Send this visualization to others.

Entertainment Options in Different States

Public visualization

Entertainment Options in Different States

0 stars0🌍 Public
PPrasanth
Last edited Mar 19, 2023
Created on Mar 19, 2023

This example shows the cost of entertainment options in twelve U.S. states using a horizontal bar chart rendered as SVG with React. The chart displays state names on the y-axis and numerical cost values on the x-axis, with red tick lines and labeled axes. The code loads CSV data via D3’s `d3.csv` method, slices the first twelve records, and uses `d3.scaleBand` and `d3.scaleLinear` to map states and costs to pixel positions. React manages the data state and renders the SVG elements, including bars and axis ticks, within a single D3-powered component.

AI-generated description

A whole smiley face

Comments

Sign in to join the discussion.

MIT Licensed