Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.java4less.rchart
Class LogScale

    java.lang.Object
      |
      +--com.java4less.rchart.Scale
            |
            +--com.java4less.rchart.LogScale

public class LogScale
extends Scale

    The scale converts the data to screen coordinates using logarithms.

    Example:

     // create axis
    com.java4less.rchart.Axis YAxis=new Axis(Axis.VERTICAL,new logScale()
    YAxis.scale.base=10;
    YAxis.scale.min=1;
    YAxis.scale.max=10000;

    Note: logarithmic scales do not accept negative values.

Field Summary
`double` | `base` Base of the logarithm for the scale.

Fields inherited from class com.java4less.rchart.Scale
`exactMaxValue, exactMinValue, max, min, preferred_MaxMin_values, reverse, screenMax, screenMaxMargin, screenMin`

Constructor Summary
`LogScale()`
`LogScale(int ma, int mi)`

Method Summary
`int` | `getScreenCoord(double v)` convert a value to the screen coordinate.
`double` | `getValue(int c)` converts a screen coordinate to the real value.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### base

    public double base

  Base of the logarithm for the scale. - The default is 2. This means, the distance between 1 and 2 will be the same as the distance between 2 and 4, 4 and 8... - A base of 10 means that the distance between 1 and 10 will be the same as the distance between 10 and 100, 100 and 1000 ...

Constructor Detail

### LogScale

    public LogScale()

### LogScale

    public LogScale(int ma,
                    int mi)

Method Detail

### getScreenCoord

    public int getScreenCoord(double v)

  Description copied from class: `Scale`
  convert a value to the screen coordinate.

  Overrides:
    `getScreenCoord` in class `Scale`

### getValue

    public double getValue(int c)

  Description copied from class: `Scale`
  converts a screen coordinate to the real value.

  Overrides:
    `getValue` in class `Scale`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD