Skip to main content
100%

Range Slider D3 V4

✓ Published0🌍 Public
CChandrakantThakkarDigiCorp
Last edited Feb 9, 2020
Created on Feb 9, 2020

This example shows an interactive range slider built with D3 v4, where a user can brush along a band scale to select a subset of values from a fixed array of numbers 1 through 10. The visualization displays the current selection as an orange arrow and a label showing the selected range. The slider includes adjustable step size, slider size, and initial index via HTML inputs, with an "Apply" button to update the scale dynamically. The code relies on `d3.scaleBand`, `d3.brushX`, and SVG element manipulation to compute snapped positions and render the selection handle.

AI-generated description

Similar vizzes