Skip to main content
100%

Brushable bar chart - Horizontal - V

✓ Published0🌍 Public
TThanaporn-sk
Last edited Mar 11, 2017
Created on Mar 11, 2017

This example shows a horizontal bar chart with a linked mini chart on the right that acts as a brushable overview. Dragging the brush box, scrolling the mouse wheel, or clicking in the mini chart changes which bars are visible in the main chart, while the x-axis scale dynamically updates to fit the largest visible bar. The visualization is built with D3 v3, using ordinal scales for the y-axis, linear scales for the x-axis, and the `d3.svg.brush` component. SVG is used for rendering, with the main chart clipped via a clip-path. The data consists of 40 randomly generated country names and numeric values sorted in descending order.

AI-generated description

This is exactly the same as version IV of the brushable horizontal bar chart, but this one has a x scale that updates to fit the largest visible bar in the available width.

For a bit more background, you can read my mini-blog about it Brushable & interactive bar chart in d3.js

forked from <a href='http://bl.ocks.org/nbremer/'>nbremer</a>'s block: <a href='http://bl.ocks.org/nbremer/4c015860931fb6a13afc7bac51f40b43'>Brushable Horizontal Bar Chart - V</a>

Similar vizzes