Skip to main content
100%

Area chart v3

✓ Published0🌍 Public
Aalex-rind
Last edited Dec 18, 2018
Created on Dec 18, 2018

This example shows a simple area chart of ten randomly generated values, rendered as a smooth filled path against a blank SVG canvas. The data is created inline using `Array.from` and `Math.random`, with values between 1 and 9. The code uses `d3.scale.linear` for both x and y axes, and `d3.svg.area` with a cardinal interpolation to draw the curved area from the baseline at height 500 up to each data point. The path is styled with a steelblue fill and stroke, and the visualization is fixed at 960 by 500 pixels.

AI-generated description

Built with blockbuilder.org

mit Licensed

Similar vizzes