3

i am using aChartEngine for android. i have a problem with the y-axis, when the values reaches 10000 or more, the left digit is disappeared (Check the photo) in the photo the values are 7000-11500 but the values appearing above 10000 are 0000,0500, . . . etc

I would like to set the y-axis labels on the right side of the axis or something like that

can anyone help ?

knowing that i used

renderer.setYLabelsAlign(Align.RIGHT);

Y-Axis Labels

Rana Osama
  • 1,313
  • 2
  • 17
  • 27

3 Answers3

2
renderer.setYLabelsAngle(angle)

To view the Y axis date if the margins are fixed, so that the data will be displayed in tilted format,in which more characters will be seen.
Else the margins spacing have to be set for viewing the y axis labels.

Noich
  • 14,631
  • 15
  • 62
  • 90
Shrinithi
  • 326
  • 4
  • 9
1

You can tweak the margins of your chart:

renderer.setMargins(margins);

where margins is an array of [top, left, bottom, right]

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.

Seraphim's
  • 12,559
  • 20
  • 88
  • 129
Dan D.
  • 32,246
  • 5
  • 63
  • 79
1
    multiRenderer.setYLabelsAlign(Paint.Align.RIGHT);
    multiRenderer.setMargins(new int[]{0, 100, 0, 0});
    multiRenderer.setYLabelsPadding(20);

Use Above code to align Y axis right with padding.

Deepak Sharma
  • 4,999
  • 5
  • 51
  • 61