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

Make visualize editor pie chart behave like Lens #82151

Closed
timroes opened this issue Oct 30, 2020 · 3 comments · Fixed by #83929
Closed

Make visualize editor pie chart behave like Lens #82151

timroes opened this issue Oct 30, 2020 · 3 comments · Fixed by #83929
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:ElasticCharts Issues related to the elastic-charts library Feature:Pie Chart Pie chart visualization feature Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@timroes
Copy link
Contributor

timroes commented Oct 30, 2020

We had a discussion across the Datavis, Product and Kibana App team around the different behavior of pie charts.

In Lens pie charts inner circles are always representing the sum of all slices of the outer circle, while in the visualize editor they are representing whatever metric was returned from Elasticsearch for that bucket. The behavior can vary especially when using fields on the outer layer that contain multiple values within one document. In this case the visualize editor pie chart might show values on the outer ring that are summed up exceeding the value on the inner ring.

This comes with a couple of unnice side-effects, like slices on an outer ring, might have the same value but show with a completely different size, since they are not comparable within the whole ring, just within their parent slice.

In the following example the both highlighted rings are representing the value "Berlin". The one showing the tooltip (on the left side) is actually having the value 2, while the right sided one is having a value of 3 - but still the one with the value of 2 appears larger in the chart.

screenshot-20201030-162905

We decided, that the behavior that Lens currently has, where the inner slice will always be the sum of the outers is the more correct one and in compliance with our understanding of sunburst charts, since this will leave the integrity of the pie chart in tact and make slices comparable to each other. This is significantly more important than having the inner slices not change their value when a new outer layer is added (because they start representing the sum of the outer layer now, instead of their own value).

We will change the behavior of the visualize editor pir chart to match the behavior in Lens, while we're replacing the vislib implementation with elastic charts in pie charts (#56143). This change is fine to be done in a minor version, while documenting it in the release notes, since we consider the current behavior to be more broken and confusing then the behavior we'll change it to.

@timroes timroes added Feature:Pie Chart Pie chart visualization feature Feature:ElasticCharts Issues related to the elastic-charts library Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Oct 30, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/datavis (Feature:ElasticCharts)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@wylieconlon
Copy link
Contributor

This issue also implies that we can make more changes:

One question is that we are planning on changing Lens to default to the Other bucket: #77749, should we do the same in vislib? Another Lens pie chart change is that we will use the same settings for Other/Missing across all Terms aggregations in the chart, should vislib do the same?

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:ElasticCharts Issues related to the elastic-charts library Feature:Pie Chart Pie chart visualization feature Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants