Responsive Axes with value labels
This example demonstrates responsive axes that maintain a consistent tick mark density as the visualization is resized. It shows a line chart with labeled X and Y axes inside a grey plotting area, where the number of ticks adjusts dynamically to the chart's dimensions. The code uses D3’s `scaleLinear`, `axisBottom`, and `axisLeft` functions, along with a `ResizeObserver` to track container size changes. Tick count is calculated by dividing the inner axis length by a fixed density value (50 pixels), ensuring readable spacing across varied widths and heights.