Skip to main content
100%

Line Chart with Circle Tooltip D3 V4

✓ Published0🌍 Public
AAnanda90
Last edited Sep 26, 2016
Created on Sep 26, 2016

This line chart visualizes yearly population values from a JSON dataset, with a focus circle and crosshairs that track the mouse to reveal the nearest data point. Built with D3 v4, it uses SVG rendering and employs `d3.scaleTime` for the x-axis, `d3.scaleLinear` for the y-axis, `d3.line` for the path, and `d3.bisector` for efficient mouseover lookup. The y-axis labels are formatted in thousands with a "k" suffix, and the chart follows conventional margins.

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/3883245'>Line Chart</a>

it uses a json file storing year values and population values. The chart employs conventional margins and a number of D3 features:

forked from <a href='http://bl.ocks.org/alandunning/'>alandunning</a>'s block: <a href='http://bl.ocks.org/alandunning/cfb7dcd7951826b9eacd54f0647f48d3'>Line Chart with Circle Tooltip D3 V4</a>

gpl-3.0 Licensed

Similar vizzes