-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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 treatment of 0 values - empty vis #2863
Comments
What is the expected behavior here? The reason no area in the pie chart is drawn is due to the fact that we use the value (0 in this case) to determine the area of the pie slice. What should be shown when a pie slice has an area of zero. You would expect that if there are other values with zeros included that you produce an area of zero to correspond to the value. The proportion that the value 0 takes up in an array of values is 0%. The only thing that I can think of in this case is simply to tell the user that they are attempting to produce a pie chart where they have no data. But I am not sure if this is what is expected. |
I chatted with Rashid about this a bit - the expectation is that you would see the inner ring, since we have that data, much like in the terms agg example. |
Two things should happen when hitting 0 values in pie charts:
|
Here's an example:
Here I have 2 levels of aggregations - Terms agg by
agent.raw
, and Filter agg ongeo.src
for US and CN. I then use the query bar to search forgeo.src: FR
. I get data back as you can see in the spy, but nothing is rendered.Conversely, if I effectively do the same thing with a Terms agg on
geo.src
and use the include filters to matchUS|CN
, and putgeo.src: FR
in the query bar, it draws the first result set (theagent.raw
data) but not the outer ring, since all values are effectively 0.Because of #2428, the terms example skips the outer ring, which seems more correct to me - the inner ring still has data in it, so the chart should render something.
The text was updated successfully, but these errors were encountered: