Bar Chart with Tooltip with Tooltip D3 V4
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 descriptionThis 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:
- d3.json - load and parse data
- d3.tickFormat - format y axis tick text
- d3.scale.ordinal - x-position encoding
- d3.scale.linear - y-position encoding
- d3.max - compute domains
- d3.svg.axis - display axes