Line Chart
This line chart visualizes the daily closing price of AAPL stock from late 2011 to mid-2012 using a clean SVG line plot. The data is loaded from a TSV file via `d3.tsv`, with dates parsed by `d3.time.format` and encoded along a time-scaled x-axis, while a linear scale maps price on the y-axis. The chart computes its domains with `d3.extent` and renders axes with `d3.svg.axis`. The single line is drawn using `d3.svg.line`, with smooth transitions between points. Standard margins frame the visualization, and the axis labels and tick marks provide clear context. Animated transitions emphasize the line’s trajectory over time, demonstrating core D3 patterns for time-series data.
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.tsv - load and parse data
- d3.time.format - parse dates
- d3.time.scale - x-position encoding
- d3.scale.linear - y-position encoding
- d3.extent - compute domains
- d3.svg.axis - display axes
- d3.svg.line - display line shape
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/jeffcatania/'>jeffcatania</a>'s block: <a href='http://bl.ocks.org/jeffcatania/56ad114a61c0104bee3e'>Line Chart</a>