Interface ITrendLine
- All Superinterfaces:
Cloneable,IDataLine,IReferenceObj
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from interface quadbase.util.IDataLine
CLOSE, DASH_STYLE, DOTTED_STYLE, HIGH, LOW, OPEN, SOLID_STYLE -
Method Summary
Modifier and TypeMethodDescriptionvoiddrawStandardDevLine(Color color, double mDev, String label) Draw lines at multiples of deviation value for a NORMAL curve only works for Histogram charts with setLinearScale invalid input: '&' setRounded to true.intgetCoeff()Get the degree for POLYNOMIAL or period for SIMPLE_AVERAGE, TRIANGULAR_AVERAGE and EXPONENTIAL_AVERAGE.double[]The function returns the interpolated constant values for Polynomial, Exponential, Logarithmic, and Power.doublegetInverseNorm(double prob) Get the INVERSE NORMAL value by specifying the probability of a NORMAL distribution curve.intGet the line typedoubleGet the line value used by horizontal/vertical line typedoublegetMax()Get the maximum value for a NORMAL curvedoublegetMean()Get the mean value for a NORMAL curvedoublegetMin()Get the minimum value for a NORMAL curvedoublegetProbability(double mDev) Get the probability to the left by specifying multiple of deviation of a NORMAL distribution curve.booleanGet the stack direction that this trend line used.doubleGet the standard deviation value for a NORMAL curvevoidsetCoeff(int coeff) Set the degree (for POLYNOMIAL) or period (for SIMPLE_AVERAGE, TRIANGULAR_AVERAGE and EXPONENTIAL_AVERAGE).
If you want to change line type also you should call setLineType() first, followed by setCoeff().voidsetLineType(int lineType) Sets the line type.voidsetLineValue(double line_value) Set the value for the horizontal line or vertical line.voidsetStackChartLine(boolean positive) This is used for stack column chart and stack area chart only.Methods inherited from interface quadbase.util.IDataLine
getColor, getLineStyle, getSeries, getShowHintValue, getThickness, getTitle, getValueColumn, getValueHint, isSecondaryValueUsed, isTitleVisibleInLegend, setColor, setLineStyle, setSeries, setShowHintValue, setThickness, setTitle, setTitleVisibleInLegend, setValueColumn, setValueHint, useSecondaryValueMethods inherited from interface quadbase.util.IReferenceObj
addAnnotation, getAnnotations, getReferencePosition, isVisible, removeAnnotation
-
Field Details
-
POLYNOMIAL
static final int POLYNOMIAL- See Also:
-
EXPONENTIAL
static final int EXPONENTIAL- See Also:
-
LOGARITHMIC
static final int LOGARITHMIC- See Also:
-
POWER
static final int POWER- See Also:
-
SIMPLE_AVERAGE
static final int SIMPLE_AVERAGE- See Also:
-
EXPONENTIAL_AVERAGE
static final int EXPONENTIAL_AVERAGE- See Also:
-
TRIANGULAR_AVERAGE
static final int TRIANGULAR_AVERAGE- See Also:
-
HORIZONTAL_LINE
static final int HORIZONTAL_LINE- See Also:
-
VERTICAL_LINE
static final int VERTICAL_LINE- See Also:
-
BSPLINE
static final int BSPLINE- See Also:
-
NORMAL_CURVE
static final int NORMAL_CURVE- See Also:
-
-
Method Details
-
setCoeff
void setCoeff(int coeff) Set the degree (for POLYNOMIAL) or period (for SIMPLE_AVERAGE, TRIANGULAR_AVERAGE and EXPONENTIAL_AVERAGE).
If you want to change line type also you should call setLineType() first, followed by setCoeff(). Otherwise the coefficient will be reset by setLineType() if setCoeff() is called first. -
getCoeff
int getCoeff()Get the degree for POLYNOMIAL or period for SIMPLE_AVERAGE, TRIANGULAR_AVERAGE and EXPONENTIAL_AVERAGE. For other types, it returns 1. -
setLineType
void setLineType(int lineType) Sets the line type. The default type is POLYNOMIAL.- Specified by:
setLineTypein interfaceIDataLine- Parameters:
lineType- the type of this trend line.
-
getLineType
int getLineType()Get the line type- Specified by:
getLineTypein interfaceIDataLine- Returns:
- line type
-
setLineValue
void setLineValue(double line_value) Set the value for the horizontal line or vertical line. For horizontal line if the Y-axis is of numeric value then the line is drawn using line_value, otherwise (i.e. Y-axis contains category name as in bar chart) the value is interpreted as :
1 - draw a line between 1st and 2nd category
2 - draw a line between 2nd and 3rd category
etc...
Similarily, line_value = 1.5 will draw a line on the 2nd category.For vertical line if the X-axis is of numeric value then the line is drawn using line_value, otherwise the value is interpreted as above.
- Specified by:
setLineValuein interfaceIDataLine- See Also:
-
getLineValue
double getLineValue()Get the line value used by horizontal/vertical line type- Specified by:
getLineValuein interfaceIDataLine- See Also:
-
setStackChartLine
void setStackChartLine(boolean positive) This is used for stack column chart and stack area chart only. Set the stack direction - positive or negative, used to draw the trend line. Positive means the trend line will use the sum of value in the positive direction to draw the trend line. Notice that for stack chart, positive and negative values are stacked in different direction. Default is positive.- Parameters:
positive- true if positive direction is used
-
getStackChartLine
boolean getStackChartLine()Get the stack direction that this trend line used.- Returns:
- true if positive direction
-
getInterpolateCoeffs
double[] getInterpolateCoeffs()The function returns the interpolated constant values for Polynomial, Exponential, Logarithmic, and Power.For non-scatter chart, the x value used for interpolation is 1, 2,.... m where m is the no. of category.
For scatter chart, x is the real value used for plotting.For polynomial of degree N, the return array c[] have N+1 values where y = c[0] + c[1]*x + c[2]*x^2 + ....
For exponential, logarithmic, and power, the return array is of size 2
y' = c[0] + c[1]*x'
where x' , y' is the transform value.
For logarithmic : x' = log(x), y'=y;
For exponential : x' = x, y' = log(y);
For power : x' = log(x), y' = log(y);This return value is valid only after the chart is actually draw. For other chart types, it returns null;
-
getMean
double getMean()Get the mean value for a NORMAL curve- Returns:
- mean value
-
getStandardDev
double getStandardDev()Get the standard deviation value for a NORMAL curve- Returns:
- standard deviation value
-
drawStandardDevLine
Draw lines at multiples of deviation value for a NORMAL curve only works for Histogram charts with setLinearScale invalid input: '&' setRounded to true. You would want the data sorted in the ascending order for the Histogram to make sense as well. To draw the line for mean, set the mDev value to 0.0.- Parameters:
color- color of the standard deviation linemDev- line to be drawn at multiples of deviation valuelabel- label of the line drawn
-
getMin
double getMin()Get the minimum value for a NORMAL curve- Returns:
- minimum value
-
getMax
double getMax()Get the maximum value for a NORMAL curve- Returns:
- maximum value
-
getProbability
double getProbability(double mDev) Get the probability to the left by specifying multiple of deviation of a NORMAL distribution curve. Normal distribution curve has been standardized to have a mean value of 0.0, and standard deviation of 1.0.- Returns:
- probability, range of 0.0 to 1.0. Maximum error of approx. 1.0X10E-9.
-
getInverseNorm
double getInverseNorm(double prob) Get the INVERSE NORMAL value by specifying the probability of a NORMAL distribution curve. Normal distribution curve has been standardized to have a mean value of 0.0, and standard deviation of 1.0. Valid input range of probability is 0.0 to 1.0, exclusive.- Returns:
- multiple of deviation value that encompasses the specified probability. Maximum error of approx. 1.5X10E-9.
-