D3: A browser default tooltip
✓ Published0🌍 Public
深深度碎片
Last edited Aug 3, 2016
Created on Aug 2, 2016
This example shows a bar chart where hovering over any bar triggers the browser's default tooltip to display the bar's value. Clicking on any bar alternates the sort order of the bars between ascending and descending, with a staggered animation that repositions each rectangle. The chart is built with D3 v4, using `d3.scaleBand` and `d3.scaleLinear` to map the array of twenty numbers to SVG rectangles. The animation relies on the `transition()` method, with `d3.ascending` and `d3.descending` comparators applied to the data on each sort.
AI-generated descriptionBuilt with blockbuilder.org
gpl-3.0 Licensed