Package org.eclipse.birt.chart.computation.withaxes

# Class AxisSubUnit

java.lang.Object
org.eclipse.birt.chart.computation.withaxes.AxisSubUnit

public final class AxisSubUnit extends Object
Computation unit for total, min, max and etc.

## Method Summary

Modifier and Type
Method
Description
`void`
`computeTotal(double dValue)`
`double`
`getLastPosition(double dValue)`
Gets the last position
`double`
`getNegativeTotal()`
`double`
`getPositiveTotal()`
`double`
`getStackedValue(double dValue)`
Returns the current accumulated value.
`boolean`
`isStackTogether()`
Returns if current positive and negative values are aggregated together or not
`void`
`reset()`
`void`
`setLastPosition(double dValue, double dBaseLocation, double dMargin)`
Saves the last position and uses to compute current position by adding margin
`double`
`stackValue(double dValue)`
Accumulates the value and returns the result.
`double`
`valuePercentage(double dValue)`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### reset

public void reset()

### isStackTogether

public boolean isStackTogether()
Returns if current positive and negative values are aggregated together or not

Returns:
  true: together, false: by sign respectively

### stackValue

public double stackValue(double dValue)
Accumulates the value and returns the result.

Parameters:
  `dValue` - the value to accumulate
Returns:
  the result value after accumulating
See Also:
  - `isStackTogether()`
  - `getStackedValue(double)`

### getStackedValue

public double getStackedValue(double dValue)
Returns the current accumulated value.

Parameters:
  `dValue` - value to check the sign. If stack together, it's no use.
Returns:
  the current accumulated value.

### computeTotal

public void computeTotal(double dValue)

### getPositiveTotal

public double getPositiveTotal()

### getNegativeTotal

public double getNegativeTotal()

### valuePercentage

public double valuePercentage(double dValue)

### setLastPosition

public void setLastPosition(double dValue, double dBaseLocation, double dMargin)
Saves the last position and uses to compute current position by adding margin

Parameters:
  `dValue` - value to check the max or min location
  `dBaseLocation` - base location when last position is null
  `dMargin` - margin location
See Also:
  - "https://bugs.eclipse.org/bugs/show_bug.cgi?id=182279"

### getLastPosition

public double getLastPosition(double dValue)
Gets the last position

Parameters:
  `dValue` - value to check the max or min location