[Lens] Visualizations are tightly coupled to specific functions based on operation.dataType
#75702
Labels
Feature:Lens
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
technical debt
Improvement of the software architecture and operational architecture
Projects
This is both cleaning up tech debt in Lens and setting us up for the date ranges and a combined number histogram/range function. The main issue is that we are coupling the data type and expected display behavior. The nice thing is that we already have a second parameter on
OperationMetadata
which should be used instead:The main difference is that histograms are
interval
type, and other bucket aggregations areordinal
type. Here are the places that I have identified as needing to change:dataType === 'date'
to determine the X axis. It should instead useoperationMetadata.scaleType === 'interval'
, so that number histograms are placed on the X axis.dataType === 'date'
in suggestions, but instead they should rejectscaleType === 'interval'
dataType === 'date'
when building titles. It probably shouldhandleFilterClick
function on datatables is looking up the time field only for date histograms, but not date functions in general.The text was updated successfully, but these errors were encountered: