Handle situations where no data are present #1887
Labels
bug
Fixes for quality problems that affect the customer experience
discuss
Feature:Vislib
Vislib chart implementation
PR sent
Milestone
The current solution to handle situations where no data are present is to check the
hits
parameter on the elasticsearch response. Ifhits === 0
, then an error is thrown and thevisualize
directive displays ano results found
message in place of the chart.While this deals with situations where there are no hits, it doesn't fully address the issue. There are other ways in which an Elasticsearch response with no data can be sent to the visualization library. I am not completely sure of all the ways that this can happen, but it would be great to have a list of all the ways in which this particular situation can manifest. I will attempt to start one below.
@rashidkpc @spenceralger @jthomassie @w33ble @lukasolson @simianhacker feel free to add to the list or add to the discussion ways in which to handle these situations.
zero
, but the buckets are empty. In this situation, the visualization library renders an empty chart or throws an error if the chart rendering depends on data stored in the data object.In my opinion, case 2, isn't actually a bug. A visualization library should render 0 values. It is a valid response. Somethings have zero values and we even purposely introduce zero values with our
zero_injection
function. I think it would be very difficult to determine when and when not to display zero values. I think the real issue is to distinguish between values of 0 and elasticsearch responses that return nothing.Zero is equal to nothing, but nothing isn't always equal to zero
Thoughts?
The text was updated successfully, but these errors were encountered: