VEuPathDB / web-monorepo

A monorepo that contains all frontend code for VEuPathDB websites
Apache License 2.0
2 stars 0 forks source link

EDA Subsetting - Special handling of integer variable histogram #1200

Open dmfalke opened 2 weeks ago

dmfalke commented 2 weeks ago

Background

In EDA, range filters are treated as both min- and max-inclusive. However, histogram bins are treated as min-inclusive and max-exclusive. When brushing a histogram to select a range filter, the min of smallest selected bin, and the max of the largest selected bin are used for the min and max values of the filter, respectively. (We call this the "selected range".) This causes an inconsistent UI when selecting a bin of an integer variable, because the max value of the largest bin is not included in the count of the bin (as seen in the tooltip of the histogram), but that value is included in the filter. That creates a mismatch in the counts of the selected bins, and the count of the subset.

The proposed solution is to subtract 1 from the max value of the selected range when defining the filter. This will make the histogram and the subset consistent. Because the UI is determined by the filter, we also have to add 1 to the selected range that is passed to the histogram.

In addition, we will append the text , both included to the filter chip tooltip.

The complete list of TODOs:

bobular commented 4 days ago

Add the text , both included to the filter chip, for integer variables

I think we can add this to all number and date range filters because they all act inclusively.

Also I have a strong preference to appending just , inclusive. It's more concise and our users ought to understand!