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

[Viz] legend duplicates percentile options when chart has both left & right Y axes #112388

Closed
dmlemeshko opened this issue Sep 16, 2021 · 1 comment · Fixed by #113073
Closed
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Vis Editor Visualization editor issues Feature:XYAxis XY-Axis charts (bar, area, line) Team:Visualizations Visualization editors, elastic-charts and infrastructure :VisEditors:fix-it-week

Comments

@dmlemeshko
Copy link
Member

dmlemeshko commented Sep 16, 2021

Kibana version: latest master / 7.14.0 on cloud

Elasticsearch version: 8.0-SNAPSHOT / 7.14.0 on cloud

Server OS version: MacOS 11.4

Browser version: Chrome 93.0.4577.63

Browser OS version: MacOS 11.4

Original install method (e.g. download page, yum, from source, etc.): from source / cloud instance for 7.14.0

Describe the bug: legend duplicates percentile options when chart has left+right Y axes

Steps to reproduce:

  1. Create new Vertical Bar Chart
  2. Add 2 metrics (e.g. Avg & Mean) with different fields on Y axis, add Date Histogram on X axis
  3. Add Right axis for 2nd metric on Metrics & Axes tab
  4. Add 3rd metric as percentile (e.g. with 3 options 75, 95, 99) with one of 2 fields you picked previously
  5. Update chart

Expected behavior: Legend should display only unique options based on selected metrics

Screenshots (if relevant):

Screenshot 2021-09-16 at 11 06 43

Viz_bug.mov

Inspect panel does not show duplicates
Screenshot 2021-09-16 at 11 10 46

If you drag percentile agg to the top / middle, duplication is fixed but last option (99) is gone from legend

Viz.Legend.after.agg.dragging.mov

Errors in browser console (if relevant): no errors

Provide logs and/or server output (if relevant):

Any additional context:

Request from Inspect panel:

{
  "aggs": {
    "2": {
      "date_histogram": {
        "field": "timestamp",
        "calendar_interval": "1d",
        "time_zone": "Europe/Berlin",
        "min_doc_count": 1
      },
      "aggs": {
        "1": {
          "max": {
            "field": "requestTime"
          }
        },
        "3": {
          "percentiles": {
            "field": "maxUsers",
            "percents": [
              50
            ]
          }
        },
        "5": {
          "max": {
            "field": "requestTime"
          }
        },
        "6": {
          "percentiles": {
            "field": "requestTime",
            "percents": [
              75,
              95,
              99
            ],
            "keyed": false
          }
        }
      }
    }
  },
  "size": 0,
  "fields": [
    {
      "field": "requestSendStartTime",
      "format": "date_time"
    },
    {
      "field": "responseReceiveEndTime",
      "format": "date_time"
    },
    {
      "field": "timestamp",
      "format": "date_time"
    }
  ],
  "script_fields": {},
  "stored_fields": [
    "*"
  ],
  "runtime_mappings": {},
  "_source": {
    "excludes": []
  },
  "query": {
    "bool": {
      "must": [],
      "filter": [
        {
          "match_phrase": {
            "scenario.keyword": "org.kibanaLoadTest.simulation.branch.DemoJourney"
          }
        },
        {
          "range": {
            "timestamp": {
              "gte": "2021-08-29T01:08:56.327Z",
              "lte": "2021-09-14T20:47:53.609Z",
              "format": "strict_date_optional_time"
            }
          }
        }
      ],
      "should": [],
      "must_not": []
    }
  }
}
@dmlemeshko dmlemeshko added bug Fixes for quality problems that affect the customer experience Feature:XYAxis XY-Axis charts (bar, area, line) Team:Visualizations Visualization editors, elastic-charts and infrastructure Feature:Vis Editor Visualization editor issues labels Sep 16, 2021
@elasticmachine
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Vis Editor Visualization editor issues Feature:XYAxis XY-Axis charts (bar, area, line) Team:Visualizations Visualization editors, elastic-charts and infrastructure :VisEditors:fix-it-week
Projects
None yet
4 participants