Skip to main content
100%

fresh block

✓ Published0🌍 Public
DDjokovalle
Last edited Jan 22, 2018
Created on Jan 22, 2018

This example shows a simple scatterplot-like chart with axes, plotting five data values between 10 and 30 on a 400-by-400 SVG canvas. It demonstrates how to use d3.scaleLinear for both x and y axes, with the y-axis scaled from the chart’s height down to zero and the x-axis scaled from zero to the data maximum. The code appends two groups to the SVG, translating them to position the axes, and uses d3.axisBottom and d3.axisLeft to render the ticks. The data is hardcoded as an array, and the visualization relies solely on d3.v4 for scaling and axis generation.

AI-generated description

Built with blockbuilder.org

mit Licensed

Similar vizzes