Style Intelligence v12.0

inetsoft.graph.scale
Class LogScale

java.lang.Object
  extended by inetsoft.graph.scale.Scale
      extended by inetsoft.graph.scale.LinearScale
          extended by inetsoft.graph.scale.LogScale
All Implemented Interfaces:
Serializable, Cloneable

public class LogScale
extends LinearScale

A log scale maps numeric values on a logarithmic scale.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class inetsoft.graph.scale.Scale
Scale.Value
 
Field Summary
 
Fields inherited from class inetsoft.graph.scale.Scale
GAPS, MAX_VALUE, MIN_VALUE, NO_NULL, RAW, TICKS, ZERO, ZERO_VALUE
 
Constructor Summary
LogScale()
          Default constructor.
LogScale(double min, double max)
          Create a scale with user specified min and max.
LogScale(String[] fields)
          Create a scale for the specified columns.
 
Method Summary
 double add(double v1, double v2)
          Add two mapped values to get the total value.
 int getBase()
          Get the base of the log.
 double[] getMinorTicks()
          Minor ticks are not supported by log scale.
 double[] getTicks()
          Get the tick positions.
 Object[] getValues()
          Get the values at each tick.
protected  double mapValue(double val)
          Return the log value.
 void setBase(int base)
          Set the base of the log.
 double unmap(double val)
          This is the reverse of mapValue.
 
Methods inherited from class inetsoft.graph.scale.LinearScale
clone, clone, getIncrement, getMax, getMin, getMinorIncrement, getScaleRange, getUnitCount, getUserMax, getUserMin, init, isReversed, isSharedRange, mapValue, setIncrement, setMax, setMin, setMinorIncrement, setReversed, setScaleRange, setSharedRange, toString
 
Methods inherited from class inetsoft.graph.scale.Scale
createScale, equals, getAxisSpec, getDataFields, getFields, getScaleOption, hashCode, map, setAxisSpec, setDataFields, setFields, setScaleOption
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LogScale

public LogScale()
Default constructor.


LogScale

public LogScale(double min,
                double max)
Create a scale with user specified min and max.


LogScale

public LogScale(String[] fields)
Create a scale for the specified columns.

Method Detail

setBase

public void setBase(int base)
Set the base of the log. The default is 10.


getBase

public int getBase()
Get the base of the log.


mapValue

protected double mapValue(double val)
Return the log value.

Overrides:
mapValue in class LinearScale

add

public double add(double v1,
                  double v2)
Add two mapped values to get the total value.

Overrides:
add in class Scale
Parameters:
v1 - the specified mapped value a.
v2 - the specified mapped value b.
Returns:
the new total value.

unmap

public double unmap(double val)
This is the reverse of mapValue.

Overrides:
unmap in class LinearScale

getTicks

public double[] getTicks()
Get the tick positions. The values of the ticks are logical coordinate position same as the values returned by map().

Overrides:
getTicks in class LinearScale
Returns:
double[] represent the logical position of each tick.

getValues

public Object[] getValues()
Get the values at each tick.

Overrides:
getValues in class LinearScale
Returns:
Object[] represent values on each tick.

getMinorTicks

public double[] getMinorTicks()
Minor ticks are not supported by log scale.

Overrides:
getMinorTicks in class LinearScale
Returns:
the minor ticks, null means need not to paint minor ticks.

Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.