Skip to main content
100%

D3: Removing values from a chart

✓ Published0🌍 Public
MMathReynaud
Last edited Jan 30, 2018
Created on Jan 30, 2018

Clicking the text removes the first value from a static D3 bar chart, shifting the remaining bars left and recalculating their heights. The example demonstrates the enter, update, and exit pattern with `dataset.shift()`, re-binding data to SVG `rect` and `text` elements, and updating ordinal `xScale` and linear `yScale` domains. Transitions animate the bars sliding to new positions or exiting off the right edge.

AI-generated description

Built with blockbuilder.org

mit Licensed

Similar vizzes