Horizontal Bar Chart with Tooltip D3 V4
✓ Published0🌍 Public
Aalandunning
Last edited Oct 19, 2016
Created on Sep 23, 2016
A horizontal bar chart displays average house prices across six areas of Liverpool, UK, with bars sorted ascending by value and a tooltip showing each area and its price in pounds. Built with D3 v4 and SVG, it uses `d3.scaleLinear` for the x-axis, `d3.scaleBand` for the y-axis categories, `d3.axisBottom` and `d3.axisLeft` for ticks, and loads data from a local JSON file via `d3.json`. The x-axis ticks are formatted to show thousands, and the tooltip appears on mousemove.
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
mit Licensed