Package quadbase.util
Interface IHorzVertLine
- All Superinterfaces:
Cloneable,IDataLine,IReferenceObj
- All Known Subinterfaces:
IControlLine
This class is used to draw horizontal/vertical lines in a chart. You may call
newHorzVertLine(...) of IDataLineSet interface to get a new object.
For instance,
QbChart chart = new QbChart(...);
IHorzVertLine line = chart.gethDataLineSet().newHorzVertLine(...);
QbChart chart = new QbChart(...);
IHorzVertLine line = chart.gethDataLineSet().newHorzVertLine(...);
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic 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 TypeMethodDescriptionReturn the value of setColorAboveLine(Color).Return the value of setColorBelowLine(Color).doubleGet the start point X/Y value used by horizontal/vertical line typedoubleGet the start point X/Y value used by horizontal/vertical line typeintGet the line typedoubleGet the line value used by horizontal/vertical line typevoidsetColorAboveLine(Color color) Set the color of all chart data line segments that are above this line value (threshold value) to the desired color.voidsetColorBelowLine(Color color) Set the color of all chart data line segments which are below this line value (threshold value) to the desired color.voidsetLineFromValue(double line_from) Set the start point X/Y value for Horizontal/Vertical line.voidsetLineToValue(double line_to) Set the end point X/Y value for Horizontal/Vertical line.voidsetLineType(int lineType) Sets the line type.voidsetLineValue(double line_value) Set the value for the horizontal line or vertical line.Methods inherited from interface quadbase.util.IDataLine
getCoeff, getColor, getLineStyle, getSeries, getShowHintValue, getThickness, getTitle, getValueColumn, getValueHint, isSecondaryValueUsed, isTitleVisibleInLegend, setCoeff, setColor, setLineStyle, setSeries, setShowHintValue, setThickness, setTitle, setTitleVisibleInLegend, setValueColumn, setValueHint, useSecondaryValueMethods inherited from interface quadbase.util.IReferenceObj
addAnnotation, getAnnotations, getReferencePosition, isVisible, removeAnnotation
-
Field Details
-
HORIZONTAL_LINE
static final int HORIZONTAL_LINE- See Also:
-
VERTICAL_LINE
static final int VERTICAL_LINE- See Also:
-
CIRCULAR_STYLE
static final int CIRCULAR_STYLE- See Also:
-
SEGMENTED_STYLE
static final int SEGMENTED_STYLE- See Also:
-
-
Method Details
-
setLineType
void setLineType(int lineType) Sets the line type. The default type is HORIZONTAL_LINE.- Specified by:
setLineTypein interfaceIDataLine- Parameters:
lineType- the type of this data 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...
Similarly, 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
-
getLineValue
double getLineValue()Get the line value used by horizontal/vertical line type- Specified by:
getLineValuein interfaceIDataLine- Returns:
- line value
-
setLineFromValue
void setLineFromValue(double line_from) Set the start point X/Y value for Horizontal/Vertical line. The method is for 2D chart. The default value is X/Y origin value.- Parameters:
line_from- the start value of X/Y value for Horizontal/Vertical line.
-
getLineFromValue
double getLineFromValue()Get the start point X/Y value used by horizontal/vertical line type- Returns:
- start point X/Y value
-
setLineToValue
void setLineToValue(double line_to) Set the end point X/Y value for Horizontal/Vertical line. The method is for 2D chart. The default value is X/Y origin value + X/Y length.- Parameters:
line_to- the end value of X/Y value for Horizontal/Vertical line.
-
getLineToValue
double getLineToValue()Get the start point X/Y value used by horizontal/vertical line type- Returns:
- start point X/Y value
-
setColorAboveLine
Set the color of all chart data line segments that are above this line value (threshold value) to the desired color. Note that setColorAboveLine has a higher precedence than setColorBelowLine. The method has no effect if data connection lines are not shown. If the chart is not a line chart, the program should call gethDataPoints().setConnectLinesVisible(true) before setting the color. The default value is null. For 2D charts only.- Parameters:
color- the desired color
-
getColorAboveLine
Color getColorAboveLine()Return the value of setColorAboveLine(Color). The default value is null. For 2D charts only.- Returns:
- The color
-
setColorBelowLine
Set the color of all chart data line segments which are below this line value (threshold value) to the desired color. Note that setColorAboveLine has a higher precedence than setColorBelowLine. The method has no effect if data connection lines are not shown. If the chart is not a line chart, the program should call gethDataPoints().setConnectLinesVisible(true) before setting the color. The default value is null. For 2D charts only.- Parameters:
color- the desired color
-
getColorBelowLine
Color getColorBelowLine()Return the value of setColorBelowLine(Color). The default value is null. For 2D charts only.- Returns:
- The color
-