[Lens] Implement new metric grid visualization #134242
Labels
enhancement
New value added to drive a business result
Feature:Lens
Team:Visualizations
Visualization editors, elastic-charts and infrastructure
Based on the new metric visualization which will be part of the
elastic-charts
library, a new visualization type should be exposed in Lens.Dimension groups and options
4 dimension groups (all taking a single dimension) :
Chart level option:
Mapping of dimension groups to the chart
last 5m
Dashboard integration special cases
Behavior
The metrics are flattened out into a single list of metrics. This list of metrics is put into the grid with the configured number of columns (left to right, then starting a new row in the order of configuration).
If dynamic color is set without min and max, the full bar/panel is colored this way. If dynamic color is set together with min and max, it’s colored proportionally
If breakdowns are used, the maximum number of generated metrics is passed to the visualization (e.g. 5 for a “top 5 values of fieldX”). The visualization always renders this number of metrics in the grid - if not enough rows are available in the data table, empty cells are rendered. This is done to keep the layout of the metric grid consistent on a dashboard even with changing filters.
Default color palettes should be lightened like they are for bullets. Use full background for a single metric, if breakdown is used use the vertical bar - still give the user a choice.
Workspace shrinks when not using break down by
No longer have font size controls (resize your panel)
No alignment options for now
Interaction with formatters:
Format behavior
Old vs. new metric vis
The new metric should be implemented as a new vis type next to the existing metric vis. In the first phase, the new metric vis will be "tech preview" (this means not showing up in suggestions etc.)
Open question: How should old and new metric vis be called?
Ideas:
Implementation
The new metric vis can be implemented as a full new chart type with the explanation above. On the expression level it can be made part of the existing metric renderer by adding the new options.
The new formatting logic is implemented as part of the renderer (interpreting the passed field format as described above instead of initializing the field formatter)
In order to keep the number of rendered metrics stable, the datasource should optionally report an “expected count” (which is implemented for top values and filters operations) on Lens level which is passed to the expression function as an additional argument. For other operations it’s OK to fall back to dynamic cell rendering as these are an edge case anyway.
The text was updated successfully, but these errors were encountered: