Skip to main content
100%

Axis

✓ Published0🌍 Public
苏苏巨亮
Last edited Apr 15, 2020
Created on Apr 15, 2020
Forked from Sunburst

This example demonstrates how axes and gridlines respond to changing data domains in a D3.js visualization. It shows a simple SVG chart with an x-axis and y-axis spanning a 500×500 pixel area, with dashed gridlines extending from each tick mark. The visualization randomly rescales both axes by generating a new maximum value between 0 and 100, smoothly animating the axis transitions using `d3.transition()` and updating gridlines dynamically. Built with React, the code uses `d3.axisBottom`, `d3.axisLeft`, and `d3.scaleLinear` to render and update the axes, while the gridlines are appended as `line` elements within each tick group.

AI-generated description

React Starter code.

MIT Licensed

Similar vizzes