This could either be solved front or back end. The back end visualization endpoints have two different behaviours when there is no plottable data:
return a 500 with the message "did not contain any data" - the front end recognises this and deals appropriately
return an empty array and empty metadata (counts, bin specs etc)
For some visualizations (e.g. boxplot IIRC) 2. is OK and the back end data validation passes, but in the case below with histogram there's a null where there shouldn't be.
Remember that floating plot requests are on the subset including a viewport filter.
The data scenario that leads to 1 is simple: there is no data at all in the subset in the filter.
For scenario 2 I think the explanation is that there is data in the subset but it contains no values for the overlay variable. So this is similar to an issue we solved for bubble markers recently.
How to reproduce
This one took a while to nail down a reliable reproduction recipe:
Problem: Unexpected backend type(s) encountered: Invalid valuenullsupplied to min (type: number) of binSlider for histogram floater
Study: megastudy
Filters: none
Mode: donut, bar or bubble
Floater: Histogram, x variable = blood meal host prevalence
The error only occurs in certain map locations!
No error in whole world
Error in E. Europe + Asia + China and NO Vietnam
No error if you scroll down a tiny bit to include Vietnam
No error in Antarctica/Siberia etc
What's different between viewports 2 and 3?
There is some data with blood meal host prevalence values (I added a catch-all filter for that)
No error anywhere if the catch-all filter for blood meal host prevalence is applied
This could either be solved front or back end. The back end visualization endpoints have two different behaviours when there is no plottable data:
For some visualizations (e.g. boxplot IIRC) 2. is OK and the back end data validation passes, but in the case below with histogram there's a
null
where there shouldn't be.Remember that floating plot requests are on the subset including a viewport filter.
The data scenario that leads to 1 is simple: there is no data at all in the subset in the filter.
For scenario 2 I think the explanation is that there is data in the subset but it contains no values for the overlay variable. So this is similar to an issue we solved for bubble markers recently.
How to reproduce
This one took a while to nail down a reliable reproduction recipe:
Problem:
Unexpected backend type(s) encountered: Invalid value
nullsupplied to min (type: number) of binSlider
for histogram floaterStudy: megastudy Filters: none Mode: donut, bar or bubble Floater: Histogram, x variable = blood meal host prevalence
The error only occurs in certain map locations!
No error in Antarctica/Siberia etc
What's different between viewports 2 and 3?
There is some data with blood meal host prevalence values (I added a catch-all filter for that)
No error anywhere if the catch-all filter for blood meal host prevalence is applied
What's special about Antarctica/Siberia?
There's no data whatsoever!