Date slider - histogram legend
A draggable date slider filters a time series of data points, with a histogram serving as a color legend that updates dynamically. The visualization loads a CSV dataset containing dates and values, rendering a histogram where the color of each bar reflects the selected date range. As the user drags the slider handle, the histogram bars are animated and recolored to highlight the data falling within the current time window, while the slider's position is synchronized with the date axis. The chart uses SVG for crisp rendering and smooth transitions, adapted from Mike Bostock's drag slider technique.
AI-generated descriptionDate slider using a histogram as colour legend. Slider adapted from Mike Bostock's drag slider.
Related examples:
forked from <a href='http://bl.ocks.org/officeofjane/'>officeofjane</a>'s block: <a href='http://bl.ocks.org/officeofjane/f132634f67b114815ba686484f9f7a77'>Date slider - histogram legend</a>