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

TSVB Legend Ordering does not seem to work as expected #46466

Closed
Tracked by #179671
willemdh opened this issue Sep 24, 2019 · 7 comments
Closed
Tracked by #179671

TSVB Legend Ordering does not seem to work as expected #46466

willemdh opened this issue Sep 24, 2019 · 7 comments
Labels
blocked bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@willemdh
Copy link

Kibana version: 7.3.2

Elasticsearch version: 7.3.2

Server OS version: CentOS 7.6

Browser version: Chrome

Browser OS version: Windows 10

Original install method (e.g. download page, yum, from source, etc.): yum

Describe the bug: For some reason when I create 7.3.2 tsvb timeseries chart and select order by "Max of system.diksio.read.bytes", the legend is not sorted at all:

Steps to reproduce:

  1. Creatae tsvb visualisation. This is the json of the visualisation I'm using:
    {"attributes":{"description":"","kibanaSavedObjectMeta":{"searchSourceJSON":"{\"query\":{\"query\":\"\",\"language\":\"kuery\"},\"filter\":[]}"},"title":"Elastic Beats Metricbeat System DiskIO Read Bytes Windows Disk Name Time Series","uiStateJSON":"{}","version":1,"visState":"{\"title\":\"Elastic Beats Metricbeat System DiskIO Read Bytes Windows Disk Name Time Series\",\"type\":\"metrics\",\"params\":{\"id\":\"61ca57f0-469d-11e7-af02-69e470af7417\",\"type\":\"timeseries\",\"series\":[{\"id\":\"61ca57f1-469d-11e7-af02-69e470af7417\",\"color\":\"#68BC00\",\"split_mode\":\"terms\",\"metrics\":[{\"id\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"type\":\"max\",\"field\":\"system.diskio.read.bytes\"},{\"unit\":\"\",\"id\":\"b4c50a50-dec0-11e9-8645-256c9a1c014d\",\"type\":\"derivative\",\"field\":\"61ca57f2-469d-11e7-af02-69e470af7417\"},{\"unit\":\"\",\"id\":\"ee8a5100-dec0-11e9-8645-256c9a1c014d\",\"type\":\"positive_only\",\"field\":\"b4c50a50-dec0-11e9-8645-256c9a1c014d\"}],\"separate_axis\":0,\"axis_position\":\"right\",\"formatter\":\"bytes\",\"chart_type\":\"line\",\"line_width\":1,\"point_size\":1,\"fill\":\"0.2\",\"stacked\":\"none\",\"label\":\"\",\"terms_field\":\"system.diskio.name\",\"terms_order_by\":\"61ca57f2-469d-11e7-af02-69e470af7417\",\"terms_size\":\"10\",\"terms_direction\":\"desc\"}],\"time_field\":\"@timestamp\",\"index_pattern\":\"metricbeat\",\"interval\":\"auto\",\"axis_position\":\"left\",\"axis_formatter\":\"number\",\"axis_scale\":\"normal\",\"show_legend\":1,\"show_grid\":1,\"default_index_pattern\":\"metricbeat\",\"default_timefield\":\"@timestamp\",\"filter\":{\"query\":\"event.dataset : \\\"system.diskio\\\" AND host.os.family : \\\"windows\\\"\",\"language\":\"kuery\"}},\"aggs\":[]}"},"id":"d1982970-dec3-11e9-8536-f91cecc85017","migrationVersion":{"visualization":"7.3.1"},"references":[],"type":"visualization","updated_at":"2019-09-24T12:07:02.791Z","version":"WzU1MDUsMV0="}
  2. The above visualisation is ordered desc by system.diskio.name
  3. Ordering does not make sense

Expected behavior: TSVB legend order works fine, even for derivatives

Screenshots (if relevant):

image

Any additional context: https://discuss.elastic.co/t/tsvb-descending-order-not-working-as-expected/200862

@markov00 markov00 added bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) Team:Visualizations Visualization editors, elastic-charts and infrastructure triage_needed labels Sep 24, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@willemdh
Copy link
Author

willemdh commented Apr 8, 2020

Anyone ever had a look at this? It should not be so hard to make the TSVB legend order decently?

@willemdh
Copy link
Author

willemdh commented Aug 11, 2020

@timroes Yes, this is still valid in 7.8.1... For example:

image

Config:

image

Legend should be sorted?

@sulemanof
Copy link
Contributor

@markov00 @nickofthyme

It seems the user wants the chart to sort the legend items by values (not a series label - default).
That means, the legend should reorder its items on chart mouseover event depending on x-axis position.
I assume elastic-charts doesn't have such an option, and it only has a possibility to order items by the specified series sort index.

Does the elastic/elastic-charts#795 cover the issue?

@nickofthyme
Copy link
Contributor

@sulemanof So for example at a given x point the series in the legend/tooltip would sort by the series values at that point via min, max, etc.?

If so, you are correct that is not available in current elastic charts.

I don't think elastic/elastic-charts#795 mentions exposing the value of the series but that should be an easy addition. I added a comment to reflect this ability.

@sulemanof
Copy link
Contributor

@sulemanof So for example at a given x point the series in the legend/tooltip would sort by the series values at that point via min, max, etc.?

You're completely right !
Thanks @nickofthyme , would be a great addition since I've seen couple of the same request already 👍

@timductive timductive added the impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. label Jul 20, 2021
@stratoula
Copy link
Contributor

Thank you for contributing to this issue, however, we are closing this issue due to inactivity as part of a backlog grooming effort. If you believe this feature/bug should still be considered, please reopen with a comment.

@stratoula stratoula closed this as not planned Won't fix, can't repro, duplicate, stale Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked bug Fixes for quality problems that affect the customer experience Feature:TSVB TSVB (Time Series Visual Builder) impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

9 participants