Class AxisSubUnit
java.lang.Object
org.eclipse.birt.chart.computation.withaxes.AxisSubUnit
Computation unit for total, min, max and etc.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
computeTotal
(double dValue) double
getLastPosition
(double dValue) Gets the last positiondouble
double
double
getStackedValue
(double dValue) Returns the current accumulated value.boolean
Returns if current positive and negative values are aggregated together or notvoid
reset()
void
setLastPosition
(double dValue, double dBaseLocation, double dMargin) Saves the last position and uses to compute current position by adding margindouble
stackValue
(double dValue) Accumulates the value and returns the result.double
valuePercentage
(double dValue)
-
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:
-
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 locationdBaseLocation
- base location when last position is nulldMargin
- 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
-