Skip to main content
100%

Brush with react(axis)

✓ Published1🌍 Public
JJunyanL
Last edited Mar 5, 2020
Created on Feb 28, 2020

This example shows a line chart of a small dataset, rendered with React and D3, where the curve updates in response to button clicks that either raise each point’s value or filter the data to those under 50. The visualization uses d3.scaleLinear for both axes, d3.axisBottom and d3.axisLeft for tick marks, and d3.line with curveCardinal to draw a smooth path. The chart is an SVG whose axes and line are re-rendered via a useEffect hook whenever the state changes, with the buttons driving the dataset transformations.

AI-generated description

Experiment with 'Brush'

MIT Licensed

Similar vizzes