Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hide y axis only using AChartEngine

I don't know how to hide the y axis only. I want the numbers to stay but remove the line. Do you know how to do that?

BR

like image 349
7heViking Avatar asked Feb 23 '26 18:02

7heViking


1 Answers

You can hide both axes this way:

renderer.setShowAxes(false);

You can hide the grid independently:

renderer.setShowGridY(false);

If the above is not enough, you can set the margins such as the Y axis is not visible and move the Y axis labels to the right:

renderer.setMargins(new int[] {20, -1, 10, 20});
renderer.setYLabelsAlign(Align.LEFT);
renderer.setYLabelsPadding(-10);
like image 69
Dan D. Avatar answered Feb 26 '26 07:02

Dan D.



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!