Skip to main content
100%

Bar chart (rotating + highlighting)

✓ Published0🌍 Public
PPatrick Wojda
Last edited Dec 24, 2018
Created on Dec 18, 2018

A bar chart presents four categories—pears, apples, bread, and oranges—with values scaled by `d3.scaleLinear`. After three seconds, the entire SVG rotates 90 degrees via a `transition`, while each text label independently counter-rotates to stay upright. Then the bread bar and its label highlight orange and enlarge through chained style transitions. This D3 v4 example uses SVG elements (`rect`, `text`) with data bound by `id`, and demonstrates `transition.duration` and `attr`/`style` tweening for animation.

AI-generated description

Built with blockbuilder.org

mit Licensed

Similar vizzes