Horizontal Bar Chart with Tooltip D3 V4
This horizontal bar chart displays average house prices across six Liverpool areas, with each bar’s length proportional to its value and a hover tooltip revealing the exact price. The visualization uses D3 v4’s `d3.scaleLinear` and `d3.scaleBand` for axes, while `d3.axisBottom` formats tick labels in thousands. Data is loaded via `d3.json` from a local `data.json` file, rendered as SVG rectangles that change fill color on hover. A custom tooltip, styled with CSS and positioned via `d3.event`, shows the area name and price in pounds.
AI-generated descriptionThis chart shows average house prices in various areas of Liverpool, UK
- 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
forked from <a href='http://bl.ocks.org/alandunning/'>alandunning</a>'s block: <a href='http://bl.ocks.org/alandunning/7008d0332cc28a826b37b3cf6e7bd998'>Horizontal Bar Chart with Tooltip D3 V4</a>