Skip to main content
100%

Responsive Axes

✓ Published0🌍 Public
Rrichad97
Last edited Apr 11, 2020
Created on Apr 4, 2020
Forked from Responsive Axes

This example demonstrates how axes and their tick density respond automatically to the size of the browser window. The chart plots a time series of COVID-19 population data from a CSV file, scaling the x-axis time domain and y-axis linear domain across the full viewport. Written with D3 v5, it uses the `d3.axisBottom` and `d3.axisLeft` APIs to generate ticks, whose spacing adjusts based on the current inner width and height. A `resize` event listener triggers re-rendering, updating the SVG dimensions and axis scales whenever the viewport changes.

AI-generated description
MIT Licensed

Similar vizzes