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

Handle negative amounts #5

Open
gka opened this issue Jan 31, 2012 · 3 comments
Open

Handle negative amounts #5

gka opened this issue Jan 31, 2012 · 3 comments

Comments

@gka
Copy link
Contributor

gka commented Jan 31, 2012

Moved from https://github.com/okfn/openspending/issues/320

Original issue:

The bubbletree doesn't produce a good error message when it gets negative amounts. It scales the radii of its circles to these amounts, and thus cannot handle the case of amounts which are negative. We should at the very least do something other than display a blank page when this condition is encountered.

Comments:

@pudo: I think this should either be in bubbletree or in the explorer plugin - putting it before means potentially screwing up the aggregator API to support JS that does not know negative nums.

@ghost ghost assigned gka Jan 31, 2012
@gka
Copy link
Contributor Author

gka commented Jan 31, 2012

I see the following options:

a) ignoring bubbles with negative amounts (= set amount to zero) – not so smart of a solution
b) allowing bubbletree to handle negative amounts (= scale radii to abs(amount), but show negative values in label/tooltip) – might be misleading, though..

opinions?

@gka
Copy link
Contributor Author

gka commented Jan 31, 2012

urgs, as of looking at https://github.com/okfn/openspending/issues/177 I noticed that negative values break the entire concept of the bubbletree, because they might add up to zero..

therefore I will chose a)

@gka
Copy link
Contributor Author

gka commented Jan 31, 2012

btw, a) is the current behaviour, but bubbles aren't ignored but displayed as tiny dots.

The problem with both solutions is that the sums of the "parent" bubbles are incorrectly set when some of the amounts are negative. It seems that negative amounts are fundamentally violating the concept of the bubbletree, which is to show the hierarchical breakdown of amounts into smaller chunks..

Not sure what to do about this..

@pwalsh pwalsh removed this from the 1.0.0 milestone Dec 15, 2015
@pwalsh pwalsh added this to the Backlog milestone Dec 15, 2015
@pwalsh pwalsh unassigned gka Dec 15, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants