Skip to main content
100%

fresh block

✓ Published0🌍 Public
PPetrando
Last edited Feb 3, 2018
Created on Feb 3, 2018

This example shows an interactive slider that controls the background color of the page, with a draggable circular handle positioned along a horizontal axis labeled in degrees from 0 to 180. A brushed value updates the hue of the background using `d3.hsl`. The code uses D3 v3’s `d3.svg.brush`, `d3.scale.linear`, and axis components to build the slider, while the `brush` and `brushend` events handle dragging and snap the value to the nearest ten degrees. The rendering is done through SVG elements, with a transition animating the initial brush extent.

AI-generated description

Since Mike is upgrading to d3.v5, a lot of old examples that works for d3.v3 is already gone. I'll just put this here in case anyone somehow need it.

I use this slider at my work here : http://scienic-data.com/normalized-stacked-barchart-browser-usage-statistic-full/

mit Licensed

Similar vizzes