Viz - Area - line - axis
✓ Published0🌍 Public
NNPashaP
Last edited Jan 1, 2018
Created on Jan 1, 2018
This example combines an area chart and a line chart on a shared y-axis, rendering 20 randomly generated data points as a smooth basis curve. The SVG output uses two D3 v4 modules: `viz.area()` fills the area beneath the curve with semi-transparent green, while `viz.line()` draws the line itself in solid green. A left-oriented axis with grey ticks and horizontal gridlines is created using `d3.axisLeft()`. The data is generated on the fly by `randomData()`, and the chart is assembled by passing the area and line components to a single `d3.select("g")` selection.
AI-generated descriptiongpl-3.0 Licensed