com.steema.teechart.styles
Class CustomBox
java.lang.Object
com.steema.teechart.TeeBase
com.steema.teechart.styles.Series
com.steema.teechart.styles.CustomPoint
com.steema.teechart.styles.Points
com.steema.teechart.styles.CustomBox
- All Implemented Interfaces:
- ISeries, java.io.Serializable, java.lang.Cloneable
- Direct Known Subclasses:
- Box, HorizBox
public class CustomBox
- extends Points
Title: CustomBox class
Description: CustomBox Series.
Copyright (c) 2005-2006 by Steema Software SL. All Rights Reserved.
Company: Steema Software SL
- See Also:
- Serialized Form
| Fields inherited from class com.steema.teechart.styles.Series |
AUTODEPTH, AUTOZORDER, bActive, bBrush, bColorEach, calcVisiblePoints, colorMember, customMarkText, drawBetweenPoints, endZ, firstVisible, hasZValues, iColors, InternalUse, iNumSampleValues, iZOrder, labelMember, lastVisible, listenerList, mandatory, manualData, marks, middleZ, notMandatory, percentDecimal, percentFormat, sLabels, startZ, useAxis, useSeriesColor, valueFormat, vxValues, vyValues, yMandatory |
| Fields inherited from class com.steema.teechart.TeeBase |
chart |
|
Method Summary |
protected void |
addSampleValues(int numValues)
|
void |
assign(Series source)
Copies all properties from one Series component to another. |
void |
doBeforeDrawValues()
|
protected void |
draw()
|
protected void |
drawMark(int valueIndex,
java.lang.String s,
SeriesMarksPosition position)
|
void |
drawValue(int index)
Called internally. |
double |
getAdjacentPoint1()
Read from AdjacentPoint1 to get SampleValues lower adjacent point
limit. |
double |
getAdjacentPoint3()
Read from AdjacentPoint3 to get SampleValues upper adjacent point. |
SeriesPointer |
getBox()
Controls the appearance of CustomBoxSeries box. |
SeriesPointer |
getExtrOut()
Controls the appearance of the extreme range of outer points. |
double |
getInnerFence1()
Read from InnerFence1 to get SampleValues lower inner fence. |
double |
getInnerFence3()
Read from InnerFence3 to get SampleValues upper inner fence. |
double |
getMedian()
Read from Median to get SampleValues median value. |
ChartPen |
getMedianPen()
Defines the Pen to draw the median line. |
SeriesPointer |
getMildOut()
Controls the appearance of the mid range of outer points. |
double |
getOuterFence1()
Read from OuterFence1 to get SampleValues lower outer fence. |
double |
getOuterFence3()
Read from OuterFence3 to get SampleValues upper outer fence. |
double |
getPosition()
Specifies the position of box series. |
double |
getQuartile1()
Read from Quartile1 to get SampleValues first quartile. |
double |
getQuartile3()
Read from Quartile3 to get SampleValues first quartile. |
ValueList |
getSampleValues()
Use SampleValues property to get access to the values of Series. |
boolean |
getUseCustomValues()
Set to true if you want to override internal algorithm to construct a
box plot. |
double |
getWhiskerLength()
Defines the whisker length as a function of the inter-quartike range
(IQR). |
ChartPen |
getWhiskerPen()
Defines the Pen to draw the whisker lines. |
void |
prepareForGallery(boolean isEnabled)
|
void |
reconstructFromData()
Reconstructs the box plot from series data. |
void |
setAdjacentPoint1(double value)
Read from AdjacentPoint1 to get SampleValues lower adjacent point
limit. |
void |
setAdjacentPoint3(double value)
Read from AdjacentPoint3 to get SampleValues upper adjacent point. |
void |
setChart(IBaseChart c)
Chart associated with this object. |
void |
setInnerFence1(double value)
Read from InnerFence1 to get SampleValues lower inner fence. |
void |
setInnerFence3(double value)
Read from InnerFence3 to get SampleValues upper inner fence. |
void |
setMedian(double value)
Read from Median to get SampleValues median value. |
void |
setOuterFence1(double value)
Read from OuterFence1 to get SampleValues lower outer fence. |
void |
setOuterFence3(double value)
Read from OuterFence3 to get SampleValues upper outer fence. |
void |
setPosition(double value)
Specifies the position of box series. |
void |
setQuartile1(double value)
Read from Quartile1 to get SampleValues first quartile. |
void |
setQuartile3(double value)
Read from Quartile3 to get SampleValues first quartile. |
void |
setUseCustomValues(boolean value)
Set to true if you want to override internal algorithm to construct a
box plot. |
void |
setWhiskerLength(double value)
Sets the whisker length as a function of the inter-quartike range
(IQR). |
| Methods inherited from class com.steema.teechart.styles.CustomPoint |
addSeriesMouseListener, calcHorizMargins, calcVerticalMargins, calcXPos, calcYPos, calcZOrder, clicked, clickedPointer, drawLegendShape, drawPointer, getMaxXValue, getMaxYValue, getMinXValue, getMinYValue, getOriginPos, getPointer, getStacked, onGetPointerStyle, removePointerStyleResolver, removeSeriesMouseListener, setPointerStyleResolver, setStacked |
| Methods inherited from class com.steema.teechart.styles.Series |
add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, add, addChartValue, added, addNull, addNullXY, addSeriesPaintListener, addValues, assignDispose, assignValues, associatedToAxis, beginUpdate, calcFirstLastVisibleIndex, calcPosValue, calcXPosValue, calcXSizeValue, calcYPosValue, calcYSizeValue, canAddRandomPoints, changeType, checkDataSource, checkMouse, checkOrder, checkOtherSeries, clear, clearLists, clicked, clone, cloneSeries, convertArray, createNewSeries, createNewSeries, dataSourceArray, delete, delete, delete, dispose, doAfterDrawValues, doBeforeDrawChart, doClick, doClickPointer, doDoubleClick, drawLegend, drawLegend, drawMarks, drawSeries, drawSeriesForward, drawValuesForward, endUpdate, fillSampleValues, fillSampleValues, fireSeriesMouseEvent, fireSeriesPaint, galleryChanged3D, getActive, getAllowSinglePoint, getBitmapEditor, getColorEach, getColorMember, getColors, getCount, getCountLegendItems, getCursor, getCustomHorizAxis, getCustomVertAxis, getDataSource, getDepth, getEndZ, getFields, getFirstVisible, getFunction, getHasZValues, getHorizAxis, getHorizontalAxis, getLabelMember, getLabels, getLastVisible, getLegendString, getMandatory, getMarks, getMarkText, getMarkValue, getMaxZValue, getMiddleZ, getMinZValue, getNotMandatory, getNumGallerySeries, getNumSampleValues, getOriginValue, getPercentFormat, getPoint, getSeriesColor, getShowInLegend, getStartZ, getTitle, getUseAxis, getValueColor, getValueFormat, getValueIndexSwapper, getValueList, getValueList, getValueMarkText, getValuesLists, getVertAxis, getVerticalAxis, getVisible, getXValues, getYMandatory, getYValueList, getYValues, getZOrder, hasDataSource, hasListenersOf, hasNoMandatoryValues, isNull, isValidSeriesSource, isValidSourceOf, legendItemColor, legendToValueIndex, maxMarkWidth, moreSameZOrder, mouseEvent, newFromType, numSampleValues, onDisposing, paintLegend, prepareLegendCanvas, randomBounds, readResolve, recalcGetAxis, refreshSeries, removeMarkTextResolver, removeSeriesPaintListener, repaint, sameClass, setActive, setColorMember, setColors, setCursor, setCustomHorizAxis, setCustomHorizAxis, setCustomVertAxis, setCustomVertAxis, setDataSource, setDepth, setEndZ, setFunction, setHorizontal, setHorizontalAxis, setLabelMember, setLabels, setMarks, setMarkTextResolver, setMiddleZ, setNull, setPercentFormat, setSeriesColor, setShowInLegend, setStartZ, setTitle, setValueFormat, setValueList, setVerticalAxis, setVisible, setXValues, setYValues, setZOrder, setZPositions, sortByLabels, sortByLabels, swapValueIndex, titleOrName, toString, valuesListAdd, xScreenToValue, yScreenToValue |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
dPosition
protected double dPosition
iVertical
protected boolean iVertical
linePen
protected ChartPen linePen
CustomBox
public CustomBox()
CustomBox
public CustomBox(IBaseChart c)
assign
public void assign(Series source)
- Description copied from class:
Series
- Copies all properties from one Series component to another.
Only the common properties shared by both source and destination Series
are copied.
The following code copies all properties from Series2 into Series1:
Series1.Assign( Series2 ) ;
Some Series types restore method values after assigning them. For
example, Points series restores the Pointer.Visible method to true after
being assigned to a Line series, which has Pointers invisible by default.
Note: Series events are not assigned. Series DataSource and
FunctionType properties are assigned. Assign is used by
CloneChartSeries and ChangeSeriesType methods for example.
- Overrides:
assign in class CustomPoint
- Parameters:
source - Series
getWhiskerLength
public double getWhiskerLength()
- Defines the whisker length as a function of the inter-quartike range
(IQR).
Default value: 1.5
- Returns:
- double
setWhiskerLength
public void setWhiskerLength(double value)
- Sets the whisker length as a function of the inter-quartike range
(IQR).
Default value: 1.5D
- Parameters:
value - double
getBox
public SeriesPointer getBox()
- Controls the appearance of CustomBoxSeries box.
Box contains several properties to control the formatting attributes of
box, like Pen, Brush, Draw3D, Visible, etc.
- Returns:
- SeriesPointer
getSampleValues
public ValueList getSampleValues()
- Use SampleValues property to get access to the values of Series.
WARNING : If you are using internal lagorithm
(UseCustomValues = false) then you must make sure SampleValues are
sorted in ascending order.
- Returns:
- ValueList
getPosition
public double getPosition()
- Specifies the position of box series.
If series is a Box series then Position specifies the horizontal
axis position.
If series is a HorizBox series then Position specifies the vertical
axis position.
Default value: O
- Returns:
- double
setPosition
public void setPosition(double value)
- Specifies the position of box series.
Default value: O
- Parameters:
value - double
getWhiskerPen
public ChartPen getWhiskerPen()
- Defines the Pen to draw the whisker lines.
Use the properties of WhiskerPen to change the color or style of whisker
lines.
- Returns:
- ChartPen
getMedianPen
public ChartPen getMedianPen()
- Defines the Pen to draw the median line.
Use the properties of MedianPen to change the color or style of median
pen.
- Returns:
- ChartPen
reconstructFromData
public void reconstructFromData()
- Reconstructs the box plot from series data.
doBeforeDrawValues
public void doBeforeDrawValues()
- Overrides:
doBeforeDrawValues in class Series
drawValue
public void drawValue(int index)
- Called internally. Draws the "ValueIndex" point of the Series.
- Specified by:
drawValue in interface ISeries- Overrides:
drawValue in class CustomPoint
- Parameters:
index - int
addSampleValues
protected void addSampleValues(int numValues)
- Overrides:
addSampleValues in class Series
prepareForGallery
public void prepareForGallery(boolean isEnabled)
- Overrides:
prepareForGallery in class Series
drawMark
protected void drawMark(int valueIndex,
java.lang.String s,
SeriesMarksPosition position)
- Overrides:
drawMark in class CustomPoint
draw
protected void draw()
- Overrides:
draw in class Series
setChart
public void setChart(IBaseChart c)
- Description copied from class:
TeeBase
- Chart associated with this object.
- Specified by:
setChart in interface ISeries- Overrides:
setChart in class CustomPoint
- Parameters:
c - IBaseChart
getAdjacentPoint1
public double getAdjacentPoint1()
- Read from AdjacentPoint1 to get SampleValues lower adjacent point
limit.
NOTE: Writing to AdjacentPoint1 does not ensure custom value will
be used to construct a box plot.
An additional requirement is to set UseCustomValues to true.
Default value: 0
- Returns:
- double
- See Also:
CustomBox
setAdjacentPoint1
public void setAdjacentPoint1(double value)
- Read from AdjacentPoint1 to get SampleValues lower adjacent point
limit.
Default value: 0
- Parameters:
value - double
getAdjacentPoint3
public double getAdjacentPoint3()
- Read from AdjacentPoint3 to get SampleValues upper adjacent point.
AdjacentPoint3 is the data point that is closest to InnerFence3, without
lying above InnerFence3.
Write to AdjacentPoint3 to override TCustomBoxSeries default calculating
algorithm and use supplied value to construct box plot.
NOTE: Writing to AdjacentPoint3 does not ensure custom value
will be used to construct a box plot. An additional requirement is to
set UseCustomValues to true.
Default value: O
- Returns:
- double
- See Also:
CustomBox
setAdjacentPoint3
public void setAdjacentPoint3(double value)
- Read from AdjacentPoint3 to get SampleValues upper adjacent point.
Default value: O
- Parameters:
value - double- See Also:
CustomBox
getOuterFence3
public double getOuterFence3()
- Read from OuterFence3 to get SampleValues upper outer fence.
Write to OuterFence3 to CustomBox Series default calculating algorithm
and use supplied value to static finalruct box plot.
NOTE: Writing to OuterFence3 does not ensure custom value will be
used to construct a box plot. An additional requirement is to set
UseCustomValues to true.
Default value: O
- Returns:
- double
- See Also:
CustomBox
setOuterFence3
public void setOuterFence3(double value)
- Read from OuterFence3 to get SampleValues upper outer fence.
Default value: O
- Parameters:
value - double- See Also:
CustomBox
getOuterFence1
public double getOuterFence1()
- Read from OuterFence1 to get SampleValues lower outer fence.
Write to OuterFence1 to CustomBox Series default calculating algorithm
and use supplied value to static finalruct box plot.
NOTE: Writing to OuterFence1 does not ensure custom value will be
used to construct a box plot. An additional requirement is to set
UseCustomValues to true.
Default value: O
- Returns:
- double
- See Also:
CustomBox
setOuterFence1
public void setOuterFence1(double value)
- Read from OuterFence1 to get SampleValues lower outer fence.
Default value: O
- Parameters:
value - double- See Also:
CustomBox
getInnerFence1
public double getInnerFence1()
- Read from InnerFence1 to get SampleValues lower inner fence.
Write to InnerFence1 to override TCustomBoxSeries default calculating
algorithm and use supplied value to construct box plot.
NOTE: Writing to InnerFence1 does not ensure custom value will be
used to construct a box plot. An additional requirement is to set
UseCustomValues to true.
Default value: O
- Returns:
- double
- See Also:
CustomBox
setInnerFence1
public void setInnerFence1(double value)
- Read from InnerFence1 to get SampleValues lower inner fence.
Default value: O
- Parameters:
value - double- See Also:
CustomBox
getInnerFence3
public double getInnerFence3()
- Read from InnerFence3 to get SampleValues upper inner fence.
Write to InnerFence3 to override TCustomBoxSeries default calculating
algorithm and use supplied value to construct box plot.
NOTE: Writing to InnerFence1 does not ensure custom value will be
used to construct a box plot. An additional requirement is to set
UseCustomValues to true.
Default value: O
- Returns:
- double
- See Also:
CustomBox
setInnerFence3
public void setInnerFence3(double value)
- Read from InnerFence3 to get SampleValues upper inner fence.
Default value: O
- Parameters:
value - double- See Also:
CustomBox
getQuartile1
public double getQuartile1()
- Read from Quartile1 to get SampleValues first quartile.
Approximately 25% of the data will fall on or below Quartile1.
Write to Quartile1 to override TCustomBoxSeries default calculating
algorithm and use supplied value to construct box plot.
NOTE: Writing to Quartile1 does not ensure custom value will be
used to construct a box plot. An additional requirement is to set
UseCustomValues to true.
Default value: O
- Returns:
- double
- See Also:
CustomBox
setQuartile1
public void setQuartile1(double value)
- Read from Quartile1 to get SampleValues first quartile.
Default value: O
- Parameters:
value - double- See Also:
CustomBox
getQuartile3
public double getQuartile3()
- Read from Quartile3 to get SampleValues first quartile.
Approximately 75% of the data will fall on or below Quartile3.
Write to Quartile3 to override TCustomBoxSeries default calculating
algorithm and use supplied value to construct box plot.
NOTE: Writing to Quartile3 does not ensure custom value will be
used to construct a box plot. An additional requirement is to set
UseCustomValues to true.
Default value: O
- Returns:
- double
- See Also:
CustomBox
setQuartile3
public void setQuartile3(double value)
- Read from Quartile3 to get SampleValues first quartile.
Default value: O
- Parameters:
value - double- See Also:
CustomBox
getMedian
public double getMedian()
- Read from Median to get SampleValues median value.
Write to Median to CustomBox Series default calculating algorithm and
use supplied value to construct box plot.
NOTE: Writing to Median does not ensure custom value will be
used to construct a box plot. An additional requirement is to set
UseCustomValues to true.
Default value: O
- Returns:
- double
- See Also:
CustomBox
setMedian
public void setMedian(double value)
- Read from Median to get SampleValues median value.
Default value: O
- Parameters:
value - double- See Also:
CustomBox
getUseCustomValues
public boolean getUseCustomValues()
- Set to true if you want to override internal algorithm to construct a
box plot.
Default (internal) algorithm does the following steps:
1. Finds the sample Median, Quartile1, Quartile3 and IQR value.
2. Finds InnerFence1 and InnerFence3 by using the following equation:
InnerFence1 = Quartile1 - WhiskerLength*IQR
InnerFence3 = Quartile3 + WhiskerLength*IQR
3. Finds AdjacentPoint1 and AdjacentPoint3
4. Finds OuterFence1 and OuterFence3 by using the following equation:
OuterFence1 = Quartile1 - 2*WhiskerLength*IQR
OuterFence3 = Quartile3 + 2*WhiskerLength*IQR
5. Constructs a box with ends at Quartile1 and Quartile3 with an
interior line draw at the Median.
6. Indicates adjacent points and connects them to the box with lines.
Locates any data points falling between the inner and outer fences and
denotes them by a symbol. These points are considered to be mild
outliers. Indicates data points that fall beyond the outer fences by
another symbol. These points are considered to be extreme
outliers.
NOTE: If you set the UseCustomValues to true then you must
also define Median, Quartile1, Quartile3, InnerFence1, InnerFence3,
OuterFence1, OuterFence3, AdjacentPoint1 and AdjacentPoint3.
Default value: false
- Returns:
- boolean
setUseCustomValues
public void setUseCustomValues(boolean value)
- Set to true if you want to override internal algorithm to construct a
box plot.
Default value: false
- Parameters:
value - boolean
getMildOut
public SeriesPointer getMildOut()
- Controls the appearance of the mid range of outer points.
MildOut contains several properties to control the formatting
attributes of the mid range of outer points like Pen, Brush, Draw3D,
Visible, etc.
- Returns:
- SeriesPointer
getExtrOut
public SeriesPointer getExtrOut()
- Controls the appearance of the extreme range of outer points.
ExtrOut contains several properties to control the formatting
attributes of the extreme range of outer points like Pen, Brush, Draw3D,
Visible, etc.
- Returns:
- SeriesPointer