d3-simple-slider not responding

Hello, I am trying to get d3-simple-slider working in Observable, and am unable to get the slider to move.

You can see my attempt here: https://observablehq.com/@bradvoracek/d3-simple-slider

Worst case for my project I will use slider from @jashkenas/inputs, but I like the flexibility of d3-simple-slider.

I am very new to web development/js/d3/Observable, so I do not know if this is an issue that is worth pursuing. Thank you for your time.

If it helps, this is the error I receive when attempting to drag the slider:

See this thread:

I’ll send a “suggestion” to your notebook with this fix shortly.

1 Like

Here’s my take:

The changes I made:

  • The slider needs to dispatch an input event when its value changes (to be compatible with an Observable view).
  • The slider needs to expose a value property with its current value (to be compatible with an Observable view).
  • The require.alias needs to list all of d3-simple-slider’s dependencies (so that duplicate copies don’t get loaded).
1 Like

Thank you!