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 percentage is wrong if items are hidden #1706

Closed
yubiuser opened this issue Jan 19, 2021 · 4 comments · Fixed by #1707
Closed

Pie chart percentage is wrong if items are hidden #1706

yubiuser opened this issue Jan 19, 2021 · 4 comments · Fixed by #1707

Comments

@yubiuser
Copy link
Member

Versions

  Pi-hole version is new/gravity_adlist_infos v5.2.2-10-ga2625df (Latest: v5.2.3)
  AdminLTE version is new/gravity_adlist_infos v5.2.2-11-gab2bb606 (Latest: v5.3)
  FTL version is release/v5.4 vDev-a5cb6f0 (Latest: v5.4)

Platform

  • OS and version: Debian Buster (Armbinan)
  • Platform: NanoPi Neo 2 Plus

Expected behavior

One can hide items from the dashboard pie charts (Query Types and Forward destinations) by middle mouse click. The pie chart is re-drawn and the percentages of each items are re-calculate to the "new" 100%.

Actual behavior / bug

The percentage of each item still reflects the fraction as if all items have been used to calculate the denominator.

Steps to reproduce

Steps to reproduce the behavior:

Go to dashboard, hover over one item of one pie chart, middle click on one item of the legend (hide it), hover again over the oi chart.

Bildschirmfoto zu 2021-01-19 06-18-07
Bildschirmfoto zu 2021-01-19 06-18-50

@DL6ER
Copy link
Member

DL6ER commented Jan 19, 2021

Is this really a bug? Even when hiding some others, it is still that 9.1% of all queries are HTTPS queries (I'm actually surprised and shocked at the same time that Apple's new toy is that chatty...).

I can see both interpretations, but I still think the existing behavior is correct. Always showing "the share of the total" seems more meaningful to me as "the share of the remaining".

@yubiuser
Copy link
Member Author

The bug for me is the discordance between the chart (showing something like 60%) and the numbers.
I agree, the fraction of the total is more meaningful, but if the tool offers to exclude one item it should draw and calculate the same things.
In the current implementation I don't see any value in the possibility to exclude items - new nice graph, but without the corresponding numbes no new information.

@yubiuser
Copy link
Member Author

Actually I have just one (!) apple device..

DL6ER added a commit that referenced this issue Jan 19, 2021
Fix #1705 (incorrect forwardest link) and #1706 (compute shares if parts are hidden)
@DL6ER
Copy link
Member

DL6ER commented Jan 19, 2021

Implemented and already released

@DL6ER DL6ER closed this as completed Jan 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants