Make visualize editor pie chart behave like Lens #82151
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
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.
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.
The text was updated successfully, but these errors were encountered: