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

Pie Chart: Click to Filter breaks when used with a split chart bucket agg (6.5 and above) #25920

Closed
cawoodm opened this issue Nov 20, 2018 · 3 comments · Fixed by #26321
Closed
Labels
bug Fixes for quality problems that affect the customer experience Feature:Pie Chart Pie chart visualization feature regression Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@cawoodm
Copy link

cawoodm commented Nov 20, 2018

It seems the click (on a pie chart segment) filter function has gone missing in 6.5 (upgraded yesterday).

image

When clicked nothing happens but the JS error (no source code available).

Platform: Windows Server 2012, Windows 10, Elastic Search 6.5

@Bargs Bargs added bug Fixes for quality problems that affect the customer experience Feature:Pie Chart Pie chart visualization feature triage_needed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Nov 26, 2018
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@lukeelmers
Copy link
Member

I tested this on the latest master, as well as before and after the changes in #24473 (383b419) were merged. Here are my findings so far:

Before #24473:

TypeError: Cannot read property 'aggConfig' of undefined
    at Object.createFilter (vis.js:110)

After #24473:

TypeError: Cannot read property 'table' of undefined
    at Function.filter (vis_filters.js:68)

Master (throws a fatal error and redirects to 'something went wrong' page):

TypeError: Cannot read property 'table' of undefined
    at Function.filter (vis_filters.js:70)

@lukeelmers
Copy link
Member

lukeelmers commented Nov 27, 2018

Okay, now that I've had a chance to dive a little deeper, here some more cogent thoughts:

I'm able to reproduce this exactly as described on 6.5.1 (and the 6.5 branch). The problem occurs when using a split chart bucket agg type on the vis.

If you only use the split chart (single bucket), you'll get a console error similar to the following:

TypeError: Cannot read property '$parent' of undefined
    at Function.filter (commons.bundle.js:3)
    at commons.bundle.js:3
    at processQueue (vendors.bundle.js:277)
    at vendors.bundle.js:277
    at Scope.$digest (vendors.bundle.js:277)
    at vendors.bundle.js:277
    at completeOutstandingRequest (vendors.bundle.js:277)
    at vendors.bundle.js:277 "Possibly unhandled rejection: {}"

If you use the split chart with multiple buckets, you'll get the (slightly different) error reported in this issue:

TypeError: Cannot read property 'aggConfig' of undefined
    at Object.createFilter (commons.bundle.js:3)
    at Function.filter (commons.bundle.js:3)
    at commons.bundle.js:3
    at processQueue (vendors.bundle.js:277)
    at vendors.bundle.js:277
    at Scope.$digest (vendors.bundle.js:277)
    at vendors.bundle.js:277
    at completeOutstandingRequest (vendors.bundle.js:277)
    at vendors.bundle.js:277 "Possibly unhandled rejection: {}"

In both cases the filter simply isn't applied. If you do not use a split chart bucket at all, everything appears to work as expected.

On master the error is slightly different, as mentioned above. The behavior changed after #24473 was merged, which I believe just missed the cut for 6.5 but has been backported for release in 6.6.

To reproduce using the sample web logs data:

  1. Create new pie chart
  2. Metrics > keep the default count
  3. Buckets > split chart > columns > terms agg > machine.os.keyword
  4. Buckets > split slices > terms agg > tags.keyword
  5. Click apply
  6. Click on one of the pie sections to observe the error
  7. Note that if you remove the first split chart bucket agg, everything works as expected

@lukeelmers lukeelmers changed the title Click Pie Chart to Filter broken in 6.5? Pie Chart: click to filter breaks when used with a split chart bucket (6.5 and above) Nov 27, 2018
@lukeelmers lukeelmers changed the title Pie Chart: click to filter breaks when used with a split chart bucket (6.5 and above) Pie Chart: Click to Filter breaks when used with a split chart bucket agg (6.5 and above) Nov 27, 2018
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:Pie Chart Pie chart visualization feature regression Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants