Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lens] Dynamic threshold lines2 #95612

Closed

Conversation

flash1293
Copy link
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 Visualization editors, elastic-charts and infrastructure v7.13.0 v8.0.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Mar 30, 2021
@dej611
Copy link
Contributor

dej611 commented Apr 6, 2021

@elasticmachine merge upstream

@flash1293
Copy link
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 Visualization editors, elastic-charts and infrastructure 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