d3-simple-slider icon indicating copy to clipboard operation
d3-simple-slider copied to clipboard

Feature: panning the slider range by dragging

Open chatchavan opened this issue 3 years ago • 3 comments

slider.dragToPan()

See details on the corresponding entry in README.md.

chatchavan avatar Aug 22 '20 13:08 chatchavan

Thanks for the PR! I'm on holiday right now and will review next week 👍

johnwalley avatar Aug 29 '20 16:08 johnwalley

@chatchavan could you describe the use-case for this feature? One of the criteria I use to judge new features with whether we can still call the component simple. My concerns here are:

  • does this increase the API surface?
  • how many users would make use of the feature?

Again, thanks for the PR and let's keep the conversation going.

johnwalley avatar Sep 09 '20 10:09 johnwalley

General idea: This feature would be useful when exploring parameters of which range could be changed based on the dataset.

Specific use case: Suppose the user need to classify fruits for each shipment into two groups: heavy fruits and light fruits. The user uses a slider to adjust the cut-off threshold. However, for each shipment, the composition of the fruits varies. Some shipments may have heavy such as like watermelon, durians, etc. Other shipments may have light fruits such as grapes. Pre-determining the range and the granularity of the slider could be challenging for the app designer.

The panning feature allows the user to dynamically adjust the range and granularity according to the current dataset (here: weights of fruits in each shipment).

How many users would make use of this feature?: I could imagine this feature be used by any interactive data exploration application that the users can load the dataset into. Possible usage domain includes statistical analysis software and data journalism.

API surface: I'm not knowledgable enough to evaluate this.

chatchavan avatar Sep 09 '20 12:09 chatchavan