com.steema.teechart.styles
Class Histogram

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.styles.Series
          extended by com.steema.teechart.styles.Histogram
All Implemented Interfaces:
ISeries
Direct Known Subclasses:
HorizHistogram

public class Histogram
extends Series

Title: Histogram class

Description: Histogram Series.

Example:


 Histogram series = new Histogram(myChart.getChart());
 series.fillSampleValues(10);
 

Copyright (c) 2005-2013 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL


Nested Class Summary
 
Nested classes/interfaces inherited from class com.steema.teechart.styles.Series
Series.MarkTextResolver
 
Field Summary
protected  ChartPen linePen
           
protected  int previous
           
protected  boolean treatNans
           
protected  TreatNullsStyle treatnulls
           
 
Fields inherited from class com.steema.teechart.styles.Series
AUTODEPTH, AUTOZORDER, bActive, bBrush, bColorEach, calcVisiblePoints, colorMember, customMarkText, drawBetweenPoints, endZ, firstVisible, hasZValues, iColors, 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, InternalUse
 
Constructor Summary
Histogram()
           
Histogram(IBaseChart c)
           
 
Method Summary
 void add(double[] xValues, double[] yValues, boolean append)
           
 int add(double x, double y)
          Adds a new point with specified x and y values.
 void assign(Series source)
          Copies all properties from one Series component to another.
 void calcHorizMargins(Margins margins)
          Returns the number of pixels for horizontal margins
protected  double calcMinMaxValue(boolean isMin)
           
protected  Rectangle calcRectangle(int valueIndex)
           
 void calcVerticalMargins(Margins margins)
          Returns the number of pixels for vertical margins
 int clicked(int x, int y)
          Returns the ValueIndex of the "clicked" point in the Series.
 void createSubGallery(Gallery addSubChart)
           
protected  boolean doNotPaintNull()
           
 void drawValue(int valueIndex)
          Called internally.
 ChartBrush getBrush()
          Defines the Brush fill for the Histogram series.
 java.lang.String getDescription()
          Gets descriptive text.
 ChartPen getLinePen()
          Determines pen to draw the line connecting all points.
 ChartPen getLinesPen()
          Determines the pen to be used for drawing the line connecting all points.
 int getTransparency()
          The Transparency level from 0 to 100%.
 boolean getTreatNaNAsNull()
           
 TreatNullsStyle getTreatNulls()
          Defines how null points are treated.
 boolean getUseYOrigin()
           
 int getYOrigin()
           
protected  boolean IgnoreNull()
           
 void setChart(IBaseChart c)
          Chart associated with this object.
 void setSubGallery(int index)
          Creates and prepares the index'th Series style to show at sub-gallery dialog.
 void setTransparency(int value)
          Sets Transparency level from 0 to 100%.
 void setTreatNaNAsNull(boolean value)
           
 void setTreatNulls(TreatNullsStyle value)
           
 void setUseYOrigin(boolean value)
           
 void setYOrigin(int value)
           
protected  int visiblePoints()
           
 
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, addedValue, addNull, addNullXY, addSampleValues, addSeriesMouseListener, addSeriesPaintListener, addValues, assignDispose, assignValues, associatedToAxis, beginUpdate, calcFirstLastVisibleIndex, calcPercentSt, calcPosValue, calculateMarkPosition, calcXPos, calcXPosValue, calcXSizeValue, calcYPos, calcYPosValue, calcYSizeValue, calcZOrder, canAddRandomPoints, changeType, checkDataSource, checkMouse, checkOrder, checkOtherSeries, clear, clearLists, clicked, clone, cloneSeries, convertArray, countLegendItems, createNewSeries, createNewSeries, createNewSeries, dataSourceArray, delete, delete, delete, dispose, doAfterDrawValues, doBeforeDrawChart, doBeforeDrawValues, doClick, doClickPointer, doDoubleClick, draw, drawHiddenValue, drawLegend, drawLegend, drawLegendShape, drawMark, drawMarks, drawMarksSeries, drawSeries, drawSeriesForward, drawValuesForward, endUpdate, fillSampleValues, fillSampleValues, fireSeriesMouseEvent, fireSeriesPaint, firstDisplayed, galleryChanged3D, getActive, getAllowSinglePoint, getColor, getColorEach, getColorMember, getColors, getCount, getCountLegendItems, getCursor, getCustomHorizAxis, getCustomVertAxis, getDataSource, getDefaultColor, getDefaultNullValue, getDepth, getEndZ, getFields, getFirstVisible, getFunction, getHasZValues, getHorizAxis, getHorizontalAxis, getLabelMember, getLabels, getLastVisible, getLegendString, getMandatory, getMandatoryAxis, getMarks, getMarkText, getMarkValue, getMaxXValue, getMaxYValue, getMaxZValue, getMiddleZ, getMinXValue, getMinYValue, 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, hasClickEvents, hasDataSource, hasListenersOf, hasNoMandatoryValues, isNull, isPointInChartRect, isValidSeriesSource, isValidSourceOf, lastDisplayed, lastVisibleMark, legendItemColor, legendToValueIndex, maxMarkWidth, moreSameZOrder, mouseEvent, newFromType, numSampleValues, onDisposing, prepareForGallery, prepareLegendCanvas, randomBounds, readResolve, recalcGetAxis, refreshSeries, removeMarkTextResolver, removeSeriesMouseListener, removeSeriesPaintListener, repaint, sameClass, setActive, setColor, setColorEach, setColorMember, setColors, setCursor, setCustomHorizAxis, setCustomHorizAxis, setCustomVertAxis, setCustomVertAxis, setDataSource, setDefaultNullValue, setDepth, setEndZ, setFunction, setHorizontal, setHorizontalAxis, setLabelMember, setLabels, setMarks, setMarkTextResolver, setMiddleZ, setNull, setNull, setPercentFormat, setSeriesColor, setShowInLegend, setStartZ, setTitle, setValueFormat, setValueList, setVerticalAxis, setVisible, setXValues, setYValues, setZOrder, setZPositions, sortByLabels, sortByLabels, swapValueIndex, titleOrName, toString, valueListOfAxis, valuesListAdd, xScreenToValue, yScreenToValue
 
Methods inherited from class com.steema.teechart.TeeBase
getChart, invalidate, setBooleanProperty, setColorProperty, setDoubleProperty, setIntegerProperty, setStringProperty
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.steema.teechart.styles.ISeries
getChart, invalidate
 

Field Detail

previous

protected transient int previous

linePen

protected ChartPen linePen

treatnulls

protected TreatNullsStyle treatnulls

treatNans

protected boolean treatNans
Constructor Detail

Histogram

public Histogram()

Histogram

public Histogram(IBaseChart c)
Method Detail

getLinesPen

public ChartPen getLinesPen()
Determines the pen to be used for drawing the line connecting all points.

Returns:
ChartPen

getBrush

public ChartBrush getBrush()
Defines the Brush fill for the Histogram series.

Overrides:
getBrush in class Series
Returns:
ChartBrush

setYOrigin

public void setYOrigin(int value)

getYOrigin

public int getYOrigin()

setChart

public void setChart(IBaseChart c)
Description copied from class: TeeBase
Chart associated with this object.

Specified by:
setChart in interface ISeries
Parameters:
c - IBaseChart

getTransparency

public int getTransparency()
The Transparency level from 0 to 100%.
Default value: 0

Returns:
int

setTransparency

public void setTransparency(int value)
Sets Transparency level from 0 to 100%.
Default value: 0

Parameters:
value - int

visiblePoints

protected int visiblePoints()

calcHorizMargins

public void calcHorizMargins(Margins margins)
Description copied from class: Series
Returns the number of pixels for horizontal margins

Overrides:
calcHorizMargins in class Series
Parameters:
margins - Margins

calcVerticalMargins

public void calcVerticalMargins(Margins margins)
Description copied from class: Series
Returns the number of pixels for vertical margins

Overrides:
calcVerticalMargins in class Series
Parameters:
margins - Margins

calcRectangle

protected Rectangle calcRectangle(int valueIndex)

clicked

public int clicked(int x,
                   int y)
Description copied from class: Series
Returns the ValueIndex of the "clicked" point in the Series.
Clicked means the X and Y coordinates are in the point screen region bounds. If no point is "touched", Clicked returns -1

Specified by:
clicked in interface ISeries
Overrides:
clicked in class Series
Parameters:
x - int
y - int
Returns:
int

drawValue

public void drawValue(int valueIndex)
Called internally. Draws the "ValueIndex" point of the Series.

Specified by:
drawValue in interface ISeries
Overrides:
drawValue in class Series
Parameters:
valueIndex - int

getUseYOrigin

public boolean getUseYOrigin()

setUseYOrigin

public void setUseYOrigin(boolean value)

createSubGallery

public void createSubGallery(Gallery addSubChart)
Overrides:
createSubGallery in class Series

setSubGallery

public void setSubGallery(int index)
Description copied from class: Series
Creates and prepares the index'th Series style to show at sub-gallery dialog.

Specified by:
setSubGallery in interface ISeries
Overrides:
setSubGallery in class Series
Parameters:
index - int

getDescription

public java.lang.String getDescription()
Gets descriptive text.

Overrides:
getDescription in class Series
Returns:
String

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 Series
Parameters:
source - Series

calcMinMaxValue

protected double calcMinMaxValue(boolean isMin)

getLinePen

public ChartPen getLinePen()
Determines pen to draw the line connecting all points.

Returns:
ChartPen

getTreatNulls

public TreatNullsStyle getTreatNulls()
Defines how null points are treated.

Returns:
TreatNullsStyle

setTreatNulls

public void setTreatNulls(TreatNullsStyle value)

add

public void add(double[] xValues,
                double[] yValues,
                boolean append)
Overrides:
add in class Series

add

public int add(double x,
               double y)
Description copied from class: Series
Adds a new point with specified x and y values.

Specified by:
add in interface ISeries
Overrides:
add in class Series
Parameters:
x - double
y - double
Returns:
int

IgnoreNull

protected boolean IgnoreNull()

doNotPaintNull

protected boolean doNotPaintNull()

getTreatNaNAsNull

public boolean getTreatNaNAsNull()

setTreatNaNAsNull

public void setTreatNaNAsNull(boolean value)