umap icon indicating copy to clipboard operation
umap copied to clipboard

Support numerical properties in facet search

Open flammermann opened this issue 1 year ago • 0 comments

Currently, facet search only supports textual properties and allows filtering features by checking boxes with values for certain properties. Features with matching values in the respective property are shown, others are hidden.

I would like to extend that to also support numerical (continuous) properties.

Proposed changes:

  • Change format in "Facet key" option from "<key>|<label>" to "<key>|<label>|<type>"
  • Possible types are "checkbox" and "number", default if not provided is "checkbox"
  • If type is "checkbox" render elements for "Facet search" panel as usual
  • If type is "number" render input fields for min and max
  • Prepopulate the min and max fields with the minimum and maximum values available for the property across all features
  • On update of min and/or max field, show/hide matching/not matching features

I already implemented an equivalent functionality for myself in version 1.3.7. Unfortunately, I missed to contribute it to the project and would now like to re-implement the functionality and contribute it straight away. ;)

Also, I am opening another feature request for date properties.

flammermann avatar Dec 26 '23 19:12 flammermann