Skip to main content
100%

Fork of Responsive Axes (Humidity Distribution)

✓ Published0🌍 Public
Ppadmeshnaik22@gmail.com
Last edited Feb 11, 2024
Created on Feb 11, 2024
Forked from Responsive Axes

This example shows monthly humidity distribution as a bar chart with responsive axes that maintain consistent tick mark density during resizing. It uses d3.scaleBand and d3.scaleLinear to map months and humidity values, with d3.axisBottom and d3.axisLeft rendering the ticks. A ResizeObserver tracks container dimensions and recomputes the scales, while computed tick counts keep spacing uniform. The SVG rendering updates on resize, and axis labels are positioned via dedicated modules from the reusable axes utility.

AI-generated description

A viz container with responsive axes that have consistent tick mark density. Try opening in full screen mode and resizing!

Challenge

  • Use this technique to make the axes on your viz responsive
MIT Licensed

Similar vizzes