ibrahimsaputra / achartengine

Automatically exported from code.google.com/p/achartengine
0 stars 0 forks source link

Consider drawing a 0 height range as a line #167

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
For a bar chart, if the bar goes from (0,0) for example, right now nothing is 
drawn.  I think drawing a 1-pixel horizontal line is a much superior look than 
leaving a gap.

Original issue reported on code.google.com by zvasv...@gmail.com on 11 Jan 2012 at 7:14

GoogleCodeExporter commented 9 years ago
Actually, instead of a 1-pixel line, the line width should be used, but in any 
case, just a horizontal line (or vertical) line.

Original comment by zvasv...@gmail.com on 11 Jan 2012 at 7:33

GoogleCodeExporter commented 9 years ago
Not sure I understand this request.

Original comment by dandrome...@gmail.com on 11 Jan 2012 at 7:55

GoogleCodeExporter commented 9 years ago
Not sure I understand this request.

Original comment by dandrome...@gmail.com on 11 Jan 2012 at 7:55

GoogleCodeExporter commented 9 years ago
Here's a screen shot.  Other than the obvious problems of a bunch of data 
points bunched up, the right side of the chart are data points which have a 
value of 0, so the range is (0,0).  There is nothing drawn there and when you 
zoom in, you get a black screen.  It would be much nicer to have horizontal 
lines there like the other data points with a small value.

Original comment by zvasv...@gmail.com on 11 Jan 2012 at 8:06

Attachments:

GoogleCodeExporter commented 9 years ago
Fixed in SVN rev r356.

Original comment by dandrome...@gmail.com on 11 Jan 2012 at 5:21

GoogleCodeExporter commented 9 years ago
Thanks.  There is still an issue, though, please see attached screen.

The 0 values do render now, but not the very small values.

Original comment by zvasv...@gmail.com on 12 Jan 2012 at 3:08

Attachments:

GoogleCodeExporter commented 9 years ago
I changed the "if" statement to this to fix this:

if (Math.abs(yMax - yMin) < 1) {
   if (yMin < yMax)
       yMax = yMin + 1;
   else
       yMax = yMin - 1;
}

Original comment by zvasv...@gmail.com on 12 Jan 2012 at 3:31

GoogleCodeExporter commented 9 years ago
I included your fix. Thanks!

Original comment by dandrome...@gmail.com on 12 Jan 2012 at 1:28