Responsive Axes
✓ Published0🌍 Public
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 descriptionMIT Licensed