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

negative values are rendered in bars #23

Closed
GoogleCodeExporter opened this issue Aug 25, 2015 · 3 comments
Closed

negative values are rendered in bars #23

GoogleCodeExporter opened this issue Aug 25, 2015 · 3 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. draw a bar chart with poitive & negative values & display values

What is the expected output? What do you see instead?
values put on top of positive bars, negative values put below negative values. 
Instead the negative values are rendered unreadable in the bars, see attached 
snapshot.

What version of the product binary library are you using?
0.5


Original issue reported on code.google.com by achim.ha...@googlemail.com on 18 Nov 2010 at 6:53

Attachments:

@GoogleCodeExporter
Copy link
Author

This is not a bug, but rather a wrong usage of the APIs.
Each element in a RangeCategorySeries gets a min and a max value. Min value 
labels are rendered below the bar and the max value labels above the bar.

In the example you provided, the max value is -2000 and the min value is 0, 
which of course is not right.
Just set the min value = -2000 and the max to 0 and it will work fine.

Original comment by dandrome...@gmail.com on 20 Nov 2010 at 11:01

  • Changed state: Done

@GoogleCodeExporter
Copy link
Author

Hello,

I'm not using RangeCategorySeries in this example, but CategorySeries. It's a 
simple BarChartView with a series with values ranging from +2575 to -2028.
I've also set the mentioned min/max Values you're referring to (+/-500 to get 
some space on top/on bottom):

if (min < 0) renderer.setYAxisMin(min - 500);
renderer.setYAxisMax(max + 500);

do I have to use RangeCategorySeries instead or is it a bug in CategorySeries?

best regards, Achim

Original comment by achim.ha...@googlemail.com on 22 Nov 2010 at 1:28

@GoogleCodeExporter
Copy link
Author

The range bar chart was designed to be used with RangeCategorySeries.

Dan

Original comment by dandrome...@gmail.com on 26 Nov 2010 at 12:56

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

1 participant