Skip to content

[Lens] Dynamic threshold lines2#95612

Closed
flash1293 wants to merge 7 commits intoelastic:masterfrom
flash1293:lens/dynamic-threshold-lines2
Closed

[Lens] Dynamic threshold lines2#95612
flash1293 wants to merge 7 commits intoelastic:masterfrom
flash1293:lens/dynamic-threshold-lines2

Conversation

@flash1293
Copy link
Copy Markdown
Contributor

@flash1293 flash1293 commented Mar 27, 2021

Fixes #87551

Screenshot 2021-03-30 at 15 08 07

Screenshot 2021-03-30 at 15 02 55

Screenshot 2021-03-30 at 15 04 56

Implements dynamic thresholds. PR is not cleaned up yet, but functionality is there.

It allows the user to add a threshold layer type which only takes metrics and shows them as vertical or horizontal lines (together with the settings we discussed: axis assignment, icon, line type, line width, color). As seen in the screenshots it's possible to use it on the y axis and a numerical x axis (histogram)

Things to discuss

  • Should we allow text based labels along with icons? In a lot of cases I don't think the icons are especially helpful
  • Should we add some kind of indicator if there's an off-screen annotation? The scale is defined by the data series, so an annotation might be rendered outside of the visual area. We could either extend the scale in this case, keep the current behavior or do something else. It confused me a bit while using the UI.
  • What are good defaults for color and line width?
  • If there's no icon, you can't see the exact value of the threshold which is annoying. Maybe we can do better?
  • Axis assignment - should the user pick a data metric to follow or a specific axis? If it's an axis, should we use the same "auto" logic as for data metric axis assignments or something else?
  • Defaults continued - if a new threshold is created, should it "inherit" the settings from the existing metric or should we always starts from scratch?
  • Icon placement - should we do something else as we are doing right now (which is the elastic-charts default)?
  • Dashed/dotted styles - are they pretty?
  • Formatting - allow own formatting per threshold (like it is right now) or inherit from the bound axis or something else?

Missing

  • Tests
  • Cleanup
  • Only allow axes that will work
  • Missleading info icon for color picker

[skip ci]

@flash1293 flash1293 added Feature:Lens release_note:enhancement Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.13.0 v8.0.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Mar 30, 2021
@dej611
Copy link
Copy Markdown
Contributor

dej611 commented Apr 6, 2021

@elasticmachine merge upstream

@flash1293
Copy link
Copy Markdown
Contributor Author

Closing - I think we know enough to implement this properly

@flash1293 flash1293 closed this Jun 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Deprecated - use backport:version if exact versions are needed Feature:Lens release_note:enhancement Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v7.14.0 v8.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Lens] Support dynamic thresholds based on a query

4 participants