8

In the achartengine library, the class XYMultipleSeriesRenderer which has two functions:

public void setXLabelsColor(int color)

public void setYLabelsColor(int scale, int color)

setXLabelsColor() intuitively makes sense since one only needs to pass in the color, but for the longest time I could not figure out what the 'scale' argument is for setYLabelsColor did. The docs says, it is "renderer scale", but it is not apparently clear what values scale could be. After messing around with the inputs, I finally got the function to work with a 'scale' value of 0. This does not make intuitive sense to me. I thought that a scale value of 1 would mean the chart keeps its scale. Why does a value of 0 work, whereas a default scale value of 1 doesn't?

JNI_OnLoad
  • 5,472
  • 4
  • 35
  • 60
Eric Ren
  • 172
  • 1
  • 7

2 Answers2

3

Take a look at below image. There are two lines in there, scaled in a separate way, the "Air temperature" on the left having scale = 0 and the "Sunshine hours" on the right having scale = 1. pic
(source: achartengine.org)

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Dan D.
  • 32,246
  • 5
  • 63
  • 79
  • dear Dan i'm facing a problem with scaling in my Barcharts,i have a huge number for y series label(hard to read) and i want it to change to 0.000001 scale,but setting scale doesn't change the scale and i don't want to divide my data with this scale,is there any way to set scale just for y label? – Arash GM Nov 24 '13 at 11:27
  • I suggest you ask a separate question describing exactly what the issue is. I think you misunderstand the concept of scale in AChartEngine. – Dan D. Nov 24 '13 at 14:41
2

I believe that scale is meant to refer to which series that you are editing. In a multipleXYseriesrenderer, the scale number refers to the "nth" series you entered. For example, if you only have 1 series, then editing scale "0" will edit only that series. This is what my understanding is, although I cannot say for certain. IT seems that the documentation could certainly use some cleaning up.