Skip to main content
100%

D3: Adding values and elements to a chart

✓ Published0🌍 Public
SS-trunk
Last edited Jun 25, 2017
Created on Jun 22, 2017

This chart displays a dataset of twenty-one coordinate pairs plotted as circles on an SVG canvas. It shows how values and visual elements can be dynamically added and transformed. The example uses D3 v4, implementing scales via `d3.scaleLinear`, axes drawn with `d3.axisBottom` and `d3.axisLeft`, and circles created through `.enter()`. A button triggers a repeating transition animation: the circles swap their x and y coordinates—changing from green to blue and back—using D3 `.transition()`, `.duration()`, and `.delay()` for a sequential, looping effect.

AI-generated description

Similar vizzes