Class AxisSubUnit
- java.lang.Object
-
- org.eclipse.birt.chart.computation.withaxes.AxisSubUnit
-
public final class AxisSubUnit extends java.lang.ObjectComputation unit for total, min, max and etc.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomputeTotal(double dValue)doublegetLastPosition(double dValue)Gets the last positiondoublegetNegativeTotal()doublegetPositiveTotal()doublegetStackedValue(double dValue)Returns the current accumulated value.booleanisStackTogether()Returns if current positive and negative values are aggregated together or notvoidreset()voidsetLastPosition(double dValue, double dBaseLocation, double dMargin)Saves the last position and uses to compute current position by adding margindoublestackValue(double dValue)Accumulates the value and returns the result.doublevaluePercentage(double dValue)
-
-
-
Method Detail
-
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 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
-
-