Skip to main content
100%

Fork of Responsive Axes - with large values

✓ Published0🌍 Public
HHitesh Jangid
Last edited Feb 8, 2024
Created on Feb 8, 2024
Forked from Responsive Axes

This example demonstrates a responsive scatterplot-like visualization with axes that maintain consistent tick mark density when the chart is resized. It shows time-series data on the x-axis and large numeric values on the y-axis, ranging up to 97,582, with axis labels for both dimensions. The implementation uses D3 v7, leveraging `scaleLinear`, `scaleTime`, `axisLeft`, and `axisBottom` to render the axes. A ResizeObserver detects container size changes, and the tick density is dynamically calculated by dividing the inner width and height by user-defined constants. The chart includes a gray inner rectangle as the plotting area.

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