Skip to content Skip to sidebar Skip to footer

Achartengine Does Not Display The Maximum Chart Value - Bar Chart

I am working on Achart Engine and i am facing 2 issues Issue 1) i am facing exactly same problem as posted in the screen shot here displaying max chart values on Y axis 2) suppos

Solution 1:

Just set the Y axis maximum value to something that is higher than the biggest value.

Bar charts with value of zero must be displayed. If there isn't any value to be added than just use MathHelper.NULL_VALUE.

Solution 2:

There are two ways to solve this problem.

One of the ways is to set the margin color to transparent in the renderer

renderer.setMarginsColor(Color.argb(0x00, 0xff, 0x00, 0x00));

This solution works unless your series have values that are outside the range of the chart. You can either recreate your series so all values are inside the range, or go for solution 2.

Solution 2 is to multiply the max Y value of your chart by 1.1, and set it as the Y max

mRenderer.setYAxisMax(maxvalue*1.1);

Post a Comment for "Achartengine Does Not Display The Maximum Chart Value - Bar Chart"