What does it do?

Interactively play with your scales in any vis, just by replacing your initialization of the scales from

const colorScale = d3.scaleSequential(...);
const colorScale = d3.scaleInteractive('color', updateChart).scaleSequential(...);
This way it's easy to develop with/turn on and off. Maybe there could even be a check to see if we're in dev otherwise just return the scale as it is and do nothing.


color = d3.scaleInteractive('color', updateChart)
  .domain(d3.extent(data, d => d.v));

Code on GitHub