Menu

#27 Bug fix for stacked bar graph with + and - numbers

open
nobody
None
5
2010-10-30
2010-10-30
No

The stacked bar graph (example: http://pchart.sourceforge.net/documentation.php?topic=exemple21\) has a bug in it, if you have positive and negative numbers that you want to show in the same bar. The example 21 on the pChart website actually shows this error in action...the third bar for example should have the yellow "March" data above the zero line, but instead the March data is drawn over top of part of the February data, so the graph ends up representing February and March incorrectly.

The problem is that pChart assumes all numbers for a bar are either positive or negative, and can't handle both being in the same bar.

This patch fixes that, by letting pChart keep track of positive and negative numbers for each bar separately.

Discussion

  • Julian Egelstaff

    Adds separate tracking for negative numbers to the stacked bar graph function, so data sets with mixed signs in the same bar will display properly

     
  • Julian Egelstaff

    This was based on pChart 1.27d

     

Log in to post a comment.

MongoDB Logo MongoDB