Skip to main content
100%

Responsive chart

✓ Published1🌍 Public
JJunyanL
Last edited Mar 10, 2020
Created on Mar 6, 2020
Forked from colored bar chart

A responsive bar chart built with React and D3 v5 updates its layout and axes to match the container’s dimensions via a custom `useResizeObserver` hook and the `ResizeObserver` API. Three buttons control the data: incrementing each value, filtering out values above 50, and appending random numbers. Bars render as SVG `rect` elements with smooth transitions, while hover tooltips appear as text. Axes are generated using `axisBottom` and `axisLeft`.

AI-generated description

In this, we make bar chart a component so that it's re-useable; And we can define custome hook

MIT Licensed

Similar vizzes