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] Allow non-numeric metrics for metric vis #137756

Closed
Tracked by #167506 ...
flash1293 opened this issue Aug 1, 2022 · 8 comments · Fixed by #169258
Closed
Tracked by #167506 ...

[Lens] Allow non-numeric metrics for metric vis #137756

flash1293 opened this issue Aug 1, 2022 · 8 comments · Fixed by #169258
Assignees
Labels
enhancement New value added to drive a business result Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@flash1293
Copy link
Contributor

The new tech preview metric visualization only allows numerical metrics. However, there are some use cases which would benefit from non-numerical metrics (string or date):

  • Current status grid (e.g. per server, show whether it's up or down - also requires coloring based on term)
  • Show supplementary information like the host ip as secondary metric ("last value of host.ip" with a breakdown on "host.name")
  • Add another dimension for the subtitle to be able to add primary and secondary metric as well as a dynamic subtitle
@flash1293 flash1293 added enhancement New value added to drive a business result Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Lens labels Aug 1, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

@flash1293
Copy link
Contributor Author

cc @ghudgins how would you prioritize this?

@drewdaemon
Copy link
Contributor

FWIW, I think this one would be a very quick change after #137248 introduced string support at the expression level.

@ghudgins
Copy link
Contributor

ghudgins commented Aug 1, 2022

this sounds nice but how would it work with colors? it wouldn't, right?

@flash1293
Copy link
Contributor Author

Correct, for coloring we need to provide the “color by terms” feature

@drewdaemon
Copy link
Contributor

Blocked on elastic/elastic-charts#1801

@flash1293 flash1293 assigned flash1293 and unassigned flash1293 Oct 12, 2022
@drewdaemon drewdaemon self-assigned this Nov 2, 2022
@drewdaemon drewdaemon removed their assignment Nov 15, 2022
@stratoula stratoula added the impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. label Dec 20, 2022
@stratoula
Copy link
Contributor

stratoula commented Jun 29, 2023

Not blocked anymore. It would be cool if we could wait for the color by terms to be able to color these values too.

@stratoula
Copy link
Contributor

Let's use this issue only for allowing the rest of field types in the new metric. I will create a new issue for coloring.

mbondyra added a commit that referenced this issue Oct 30, 2023
## Summary

Fixes #137756 
Allows to set non numeric metrics for metric visualization for primary
and secondary metric.

<img width="369" alt="Screenshot 2023-10-19 at 13 45 47"
src="https://github.com/elastic/kibana/assets/4283304/d6f00cd1-3be8-4c07-abe0-5bd15e2e9813">
<img width="350" alt="Screenshot 2023-10-19 at 13 46 37"
src="https://github.com/elastic/kibana/assets/4283304/01978149-ca40-44c2-ba73-9698335e819a">


Doesn't include coloring by terms.
When primary metric is non-numeric:
1. when maximum value is empty, we hide maximum value group
2. when maximum value has a value we set an error message on dimension
3. we don’t allow to use a palette for coloring
4. we don’t allow to set a trendline

<img width="681" alt="Screenshot 2023-10-19 at 13 30 16"
src="https://github.com/elastic/kibana/assets/4283304/7464f9cc-c09c-42cd-bd44-f55ffc1dfad9">
<img width="456" alt="Screenshot 2023-10-19 at 13 30 22"
src="https://github.com/elastic/kibana/assets/4283304/e5726ab9-a748-4417-9b66-5bf4d708d833">



### Checklist

Delete any items that are not applicable to this PR.

- [ ] Any text added follows [EUI's writing
guidelines](https://elastic.github.io/eui/#/guidelines/writing), uses
sentence case text and includes [i18n
support](https://github.com/elastic/kibana/blob/main/packages/kbn-i18n/README.md)
- [ ]
[Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html)
was added for features that require explanation or tutorials
- [ ] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios
- [ ] Any UI touched in this PR is usable by keyboard only (learn more
about [keyboard accessibility](https://webaim.org/techniques/keyboard/))
- [ ] Any UI touched in this PR does not create any new axe failures
(run axe in browser:
[FF](https://addons.mozilla.org/en-US/firefox/addon/axe-devtools/),
[Chrome](https://chrome.google.com/webstore/detail/axe-web-accessibility-tes/lhdoppojpmngadmnindnejefpokejbdd?hl=en-US))
- [ ] If a plugin configuration key changed, check if it needs to be
allowlisted in the cloud and added to the [docker
list](https://github.com/elastic/kibana/blob/main/src/dev/build/tasks/os_packages/docker_generator/resources/base/bin/kibana-docker)
- [ ] This renders correctly on smaller devices using a responsive
layout. (You can test this [in your
browser](https://www.browserstack.com/guide/responsive-testing-on-local-server))
- [ ] This was checked for [cross-browser
compatibility](https://www.elastic.co/support/matrix#matrix_browsers)


### Risk Matrix

Delete this section if it is not applicable to this PR.

Before closing this PR, invite QA, stakeholders, and other developers to
identify risks that should be tested prior to the change/feature
release.

When forming the risk matrix, consider some of the following examples
and how they may potentially impact the change:

| Risk | Probability | Severity | Mitigation/Notes |

|---------------------------|-------------|----------|-------------------------|
| Multiple Spaces&mdash;unexpected behavior in non-default Kibana Space.
| Low | High | Integration tests will verify that all features are still
supported in non-default Kibana Space and when user switches between
spaces. |
| Multiple nodes&mdash;Elasticsearch polling might have race conditions
when multiple Kibana nodes are polling for the same tasks. | High | Low
| Tasks are idempotent, so executing them multiple times will not result
in logical error, but will degrade performance. To test for this case we
add plenty of unit tests around this logic and document manual testing
procedure. |
| Code should gracefully handle cases when feature X or plugin Y are
disabled. | Medium | High | Unit tests will verify that any feature flag
or plugin combination still results in our service operational. |
| [See more potential risk
examples](https://github.com/elastic/kibana/blob/main/RISK_MATRIX.mdx) |


### For maintainers

- [ ] This was checked for breaking API changes and was [labeled
appropriately](https://www.elastic.co/guide/en/kibana/master/contributing.html#kibana-release-notes-process)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New value added to drive a business result Feature:Lens impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants