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 treatment of 0 values - empty vis #2863

Closed
w33ble opened this issue Feb 3, 2015 · 4 comments · Fixed by #2680
Closed

Pie chart treatment of 0 values - empty vis #2863

w33ble opened this issue Feb 3, 2015 · 4 comments · Fixed by #2680
Labels
blocker bug Fixes for quality problems that affect the customer experience Feature:Vislib Vislib chart implementation PR sent

Comments

@w33ble
Copy link
Contributor

w33ble commented Feb 3, 2015

Here's an example:

screenshot 2015-02-03 15 08 48

Here I have 2 levels of aggregations - Terms agg by agent.raw, and Filter agg on geo.src for US and CN. I then use the query bar to search for geo.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 match US|CN, and put geo.src: FR in the query bar, it draws the first result set (the agent.raw data) but not the outer ring, since all values are effectively 0.

screenshot 2015-02-03 15 09 45

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.

@w33ble w33ble added bug Fixes for quality problems that affect the customer experience Feature:Vislib Vislib chart implementation labels Feb 3, 2015
@w33ble
Copy link
Contributor Author

w33ble commented Feb 3, 2015

Here's the same example on an area chart - but here 0 values make sense.

screenshot 2015-02-03 15 25 18

@w33ble w33ble changed the title Vis: Non-matching filter aggregations produce odd results Pie chart treatment of 0 values - empty vis Feb 3, 2015
@stormpython
Copy link
Contributor

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.

@w33ble
Copy link
Contributor Author

w33ble commented Feb 4, 2015

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.

@w33ble
Copy link
Contributor Author

w33ble commented Feb 4, 2015

Two things should happen when hitting 0 values in pie charts:

  • If all results are 0, tell the user all values are 0
  • If there is some non-zero data, that data should be rendered, and the 0-value data should not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocker bug Fixes for quality problems that affect the customer experience Feature:Vislib Vislib chart implementation PR sent
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants