Visualize individual timeRange not working properly #16823
Labels
bug
Fixes for quality problems that affect the customer experience
Feature:Visualizations
Generic visualization features (in case no more specific feature label is available)
The way individual time ranges are handled for visualizations is somewhere between kind of broken and broken.
You can currently specify a
timeRange
when embedding a visualization using the loader (i.e. the way you should embed a visualization), so that the visualization should use that time range instead of the global one defined by the time picker.We currently read this out in
visualize.js
and attach it to the search source, that is passed to the request handler. Since the searchSource is only used by the courier request handler and not others (TSVB, timelion, Vega), those will need different access to the configured time range.Earlier we set it to
vis.params.timeRange
and those request handler checked this one before accessing the global time range. Since #15998 we rather attach a method tovis
, that should (but currently isn't) be used from within the different request handlers. That's also why currently all those non default request handlers are broken for individual time ranges.I think it would make more sense to explicitly pass the time range to the request handler, instead of attaching this to the vis object.
This issue is related to #16641 in a way that we should also consider always requiring to specify the time range via the loader and not pass it via searchSource inheritance, that would anyway be ignored by non default request handlers.
The text was updated successfully, but these errors were encountered: