Margin between X-Axis headers and X-Axis labels in AChartEngine

Iam using stacked chart AChartEngine. Can I add a space between the X-Axis Title and X-Axis Labels. They are too closed for each other.

To establish a lower margin will only add a gap between the X-Axis Title and Legend.

+8
java android achartengine
source share
3 answers

A quick patch that solved my problem changed the X-Axis header and prefixed it with new lines, for example

renderer.setXTitle("\n\n\n Months"); 
+14
source share

Use the setMargins() method. You can set the margins between the chart and the margins of the screen.

 renderer.setMargins(new int[] {30, 100, 10, 0); 

The order of values ​​in the parameter array: top, left, bottom, right. So you need to increase the left value.

+12
source share

use this method: setXLabelsPadding

+1
source share

All Articles