Skip to main content
100%

Bar Chart with Tooltip with Tooltip D3 V4

✓ Published0🌍 Public
Aalandunning
Last edited Oct 19, 2016
Created on Sep 22, 2016

This bar chart displays average house prices for regional and national areas, using two purple-and-pink bars on a light background. It loads JSON data via `d3.json`, encodes the x-axis with `d3.scaleBand` and the y-axis with `d3.scaleLinear`, and formats y-axis ticks as thousands with "K". A custom tooltip div appears on `mousemove`, showing the area name and price, and disappears on `mouseout`. The chart uses conventional margins, `d3.axisBottom` and `d3.axisLeft`, and renders in SVG.

AI-generated description

This chart is based on <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/3885304'>Bar Chart</a>.

it uses a json file storing area names and average house prices. The chart employs conventional margins and a number of D3 features:

gpl-3.0 Licensed

Similar vizzes