- edited description
Height of bars in BarChart correct
Issue #10
resolved
I used the BarGraph and was wondering why the height of the bars were so small. I think its a failure in class BarGraph on line 111, where the maximum height will be calculated.
Instead of:
for (Bar p : points) {
maxValue += p.getValue();
}
shouldnt it be:
for (Bar p : points) {
if(p.getValue() > maxValue) {
maxValue = p.getValue();
}
}
I fixed this in my library project and after that the height of the bars uses the full height of the bar graph
Comments (4)
-
reporter -
repo owner You are correct, this must have snuck by in a pull request in the past. I have fixed it. Thanks!
-
repo owner - changed status to resolved
Fixed
-
reporter I have seen another problem with this, maybe it can help you :) When the highest bar was touched it gets an selected border, but the top isn't visible because of the maxValue/usableHeight. I reduced the maxValue by 5% or what else can help is to reduce the pixel for usableHeight :)
- Log in to comment