Line Chart with pie chart json
This example shows the number of traffic accidents per 15-minute time interval, with each data point rendered as a clickable circle. Clicking a circle displays a pie chart of accident severity distributions in a separate div, while the selected point is highlighted in red. The line chart uses d3-dsv for JSON parsing, d3-scale for time and linear scales, d3-axis for axes, and d3-shape for the line path. The pie chart is generated and removed dynamically on each click.
AI-generated descriptionThis simple line chart is constructed from a TSV file storing the closing value of AAPL stock over the last few years. The chart employs conventional margins and a number of D3 features:
- d3-dsv - parse tab-separated values
- d3-time-format - date parsing and formatting
- d3-scale - position encodings
- d3-array - data processing
- d3-axis - axes
- d3-shape - lines
forked from <a href='http://bl.ocks.org/mbostock/'>mbostock</a>'s block: <a href='http://bl.ocks.org/mbostock/3883245'>Line Chart</a>
forked from <a href='http://bl.ocks.org/ElisaDnr/'>ElisaDnr</a>'s block: <a href='http://bl.ocks.org/ElisaDnr/4fdaa27d7b1914fce00122bcc4dde37d'>Line Chart with pie chart</a>
forked from <a href='http://bl.ocks.org/ElisaDnr/'>ElisaDnr</a>'s block: <a href='http://bl.ocks.org/ElisaDnr/d0d72cdd2d5443f9a93d4a31f6904e0a'>Line Chart with pie chart json</a>