1

I'm using achartengine. I don't know how to align the labels' text with their axis. On some screens, the text is centered with the axis; on other screens, they're on the bottom or on the top of the axis.

Is there a way to globally put them in the center of the axis?

mjk
  • 2,443
  • 4
  • 33
  • 33
Gimmy88
  • 295
  • 2
  • 5
  • 13

1 Answers1

1

I think you can use the following:

mRenderer.setYLabelsAlign(Align.LEFT, 0)

If you want to set the alignment on the right side of the grid, just set Align.LEFT, which means they are align on the left.

Reading these two threads might clear it more: Android AChartEngine - Unable to change textColor of Y-Axis Labels and AChartEngine : Align Y-Axis Labels on right side of Axis itself

Hope it helps.

Community
  • 1
  • 1
Shobhit Puri
  • 25,769
  • 11
  • 95
  • 124
  • The problem is that the text is align on the side, but it is not in the middle/centered with the axis – Gimmy88 Apr 23 '13 at 07:34
  • @user2194762 The alignment of the Y axis labels works the way it is described in this answer. How exactly do you want them aligned? – Dan D. Apr 23 '13 at 07:36