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

Bar Values does not reliably work with negative values #3365

Closed
3 tasks done
hajdbo opened this issue Aug 24, 2017 · 4 comments
Closed
3 tasks done

Bar Values does not reliably work with negative values #3365

hajdbo opened this issue Aug 24, 2017 · 4 comments

Comments

@hajdbo
Copy link
Contributor

hajdbo commented Aug 24, 2017

  • I have checked the superset logs for python stacktraces and included it here as text if any
  • I have reproduced the issue with at least the latest released version of superset
  • I have checked the issue tracker for the same issue and I haven't found one similar

Superset version

master

Expected results

"Bar Values"/addingTotalValues() should display the correct total value on top of stacked bars.

Actual results

"Bar Values"/addingTotalValues() assumes that all data will be positive, and skips negative value bars. This results in totals being displayed on top of the wrong bar.
screen shot 2017-08-20 at 3 08 31 pm

Steps to reproduce

Stack a mix of positive and negative values. Make sure the last data series is the one that contains at least one negative value.

@hajdbo
Copy link
Contributor Author

hajdbo commented Aug 24, 2017

I have a patch which will display only the correct values on the correct bars.

Unsure how the value should be displayed for bars that have negative values, so I skip the value entirely, which is still an improvement over current status.
screen shot 2017-08-24 at 5 09 05 pm

@xrmx
Copy link
Contributor

xrmx commented Aug 24, 2017

Please open a PR then, it's easier to improve working code :)

@hajdbo
Copy link
Contributor Author

hajdbo commented Aug 24, 2017

see PR #3366

@mistercrunch
Copy link
Member

Notice: this issue has been closed because it has been inactive for 241 days. Feel free to comment and request for this issue to be reopened.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants