geosolutions-it / smb-portal

SaveMyByke portal
https://waffle.io/geosolutions-it/smb-portal
1 stars 3 forks source link

Histogram count is different to times element #129

Open offtherailz opened 6 years ago

offtherailz commented 6 years ago

Now we use histogram to calculate if the items in the range of the time line are a few that can be rendered on the UI. But the histgram counts items (images or features), not domain distinct items. There is a limit case when you have N items for the same time and N > expandLimit( expandLimit=(min(clientExpandLimit, serverExpandLimit))) that makes impossible to display the single point even if there is only one single domain value for the time line range.

example: 200 items for the same time. image

If expandLimit < 200, it's impossible zoom to single values, even if it is only one.

There is the possibility to check if start and end are the same, than means we have only a single domain point, but it may change if we want to calculate the histogram on the provided interval (and not starting from the first element available) as required by #127 .

We have to evaluate this as soon as possible, maybe providing some option to get unique domain values count. As an alternative we may need anytime describeDomain.

In addition if you have 20 items on a histogram bar and the user zoom and see only one point, it may be misleading. We should consider to suggest the count even on single points (mouse hover, but we need to query the back-end for a count in this situation, maybe getHistogram with startTime=endTime and 0 resolution may do the trick ? Is it possible ? ).

@giohappy @aaime please let's talk about it after holydays