Date slider - histogram legend
A date slider controls a histogram color legend, where each bar represents a year and its height shows the count of data points. Dragging the handle filters the scatterplot below, showing only records with dates up to the selected year. The visualization uses d3.csv to load the data, d3.histogram and d3.scaleTime for binning and axes, and d3.drag for the slider interaction. The color scale is d3.scaleOrdinal with a categorical range applied across year bins.
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>