com.steema.teechart.styles
Class Funnel

java.lang.Object
  extended by com.steema.teechart.TeeBase
      extended by com.steema.teechart.styles.Series
          extended by com.steema.teechart.styles.Funnel
All Implemented Interfaces:
ISeries

public class Funnel
extends Series

Title: Funnel class

Description: Funnel Series.

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
 
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
Funnel()
           
Funnel(IBaseChart c)
           
 
Method Summary
 int add(double aQuote, double aOpportunity, java.lang.String aLabel, Color aColor, boolean aFunnel)
           
protected  void addSampleValues(int numValues)
           
 int addSegment(double aQuote, double aOpportunity, java.lang.String aLabel, Color aColor)
          Adds new Funnel segment to the Series.
 int clicked(int x, int y)
          The ValueIndex of the "clicked" point in the Series.
 void doBeforeDrawChart()
           
protected  void draw()
           
protected  void drawMark(int valueIndex, java.lang.String st, SeriesMarksPosition aPosition)
           
 void drawValue(int valueIndex)
          Called internally.
 Color getAboveColor()
          Funnel segment color if Opportunity value is greater than Quote value.
 boolean getAutoUpdate()
          Reconstructs FunnelSeries with every added point.
 Color getBelowColor()
          Funnel segment color if Opportunity value is more than the DifferenceLimit % below the Quote value.
 ChartBrush getBrush()
          Defines Brush to fill Funnel Series.
 int getCountLegendItems()
           
 java.lang.String getDescription()
          Gets descriptive text.
 double getDifferenceLimit()
          The difference (expressed in Quote %) used to define the Funnel segment color.
 java.lang.String getLegendString(int legendIndex, LegendTextStyle legendTextStyle)
          Returns LegendString for LegendIndex'th item.
 ChartPen getLinesPen()
          Defines Pen to draw FunnelSeries bounding polygon.
 java.lang.String getMarkText(int valueIndex)
          Returns the String corresponding to the Series Mark text for a given ValueIndex point.
 double getMaxXValue()
          Returns the Maximum Value of the Series X Values List.
 double getMinXValue()
          Returns the Minimum Value of the Series X Values List.
 double getMinYValue()
          Returns the Minimum Value of the Series Y Values List.
 ValueList getOpportunityValues()
           
 ChartPen getPen()
          Define Pen to draw the Funnel Chart.
 boolean getQuotesSorted()
          Sorts added segments by QuoteValues in descending order.
 ValueList getQuoteValues()
          Accesses the quote values of the FunnelSeries.
 Color getWithinColor()
          Funnel segment color if Opportunity value is within DifferenceLimit % below the Quote value.
 Color legendItemColor(int legendIndex)
           
protected  java.lang.Object readResolve()
           
 void reCalc()
          Uses all Quote and Opportunity values to restatic finalruct the Funnel chart.
 void setAboveColor(Color value)
          Funnel segment color if Opportunity value is greater than Quote value.
 void setAutoUpdate(boolean value)
          Reconstructs FunnelSeries with every added point.
 void setBelowColor(Color value)
          Funnel segment color if Opportunity value is more than the DifferenceLimit % below the Quote value.
 void setChart(IBaseChart c)
          Chart associated with this object.
 void setDifferenceLimit(double value)
          Sets the difference (expressed in Quote %) used to define the Funnel segment color.
 void setOpportunityValues(ValueList value)
           
 void setQuotesSorted(boolean value)
          Sorts added segments by QuoteValues in descending order.
 void setWithinColor(Color value)
          Funnel segment color if Opportunity value is within DifferenceLimit % below the Quote value.
 
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, add, add, addChartValue, added, addedValue, addNull, addNullXY, addSeriesMouseListener, addSeriesPaintListener, addValues, assign, assignDispose, assignValues, associatedToAxis, beginUpdate, calcFirstLastVisibleIndex, calcHorizMargins, calcPercentSt, calcPosValue, calculateMarkPosition, calcVerticalMargins, calcXPos, calcXPosValue, calcXSizeValue, calcYPos, calcYPosValue, calcYSizeValue, calcZOrder, canAddRandomPoints, changeType, checkDataSource, checkMouse, checkOrder, checkOtherSeries, clear, clearLists, clicked, clone, cloneSeries, convertArray, countLegendItems, createNewSeries, createNewSeries, createNewSeries, createSubGallery, dataSourceArray, delete, delete, delete, dispose, doAfterDrawValues, doBeforeDrawValues, doClick, doClickPointer, doDoubleClick, drawHiddenValue, drawLegend, drawLegend, drawLegendShape, drawMarks, drawMarksSeries, drawSeries, drawSeriesForward, drawValuesForward, endUpdate, fillSampleValues, fillSampleValues, fireSeriesMouseEvent, fireSeriesPaint, firstDisplayed, galleryChanged3D, getActive, getAllowSinglePoint, getColor, getColorEach, getColorMember, getColors, getCount, getCursor, getCustomHorizAxis, getCustomVertAxis, getDataSource, getDefaultColor, getDefaultNullValue, getDepth, getEndZ, getFields, getFirstVisible, getFunction, getHasZValues, getHorizAxis, getHorizontalAxis, getLabelMember, getLabels, getLastVisible, getMandatory, getMandatoryAxis, getMarks, getMarkValue, getMaxYValue, 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, hasClickEvents, hasDataSource, hasListenersOf, hasNoMandatoryValues, isNull, isPointInChartRect, isValidSeriesSource, isValidSourceOf, lastDisplayed, lastVisibleMark, legendToValueIndex, maxMarkWidth, moreSameZOrder, mouseEvent, newFromType, numSampleValues, onDisposing, prepareForGallery, prepareLegendCanvas, randomBounds, 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, setSubGallery, 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
 

Constructor Detail

Funnel

public Funnel(IBaseChart c)

Funnel

public Funnel()
Method Detail

clicked

public int clicked(int x,
                   int y)
The ValueIndex of the "clicked" point in the Series.

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

readResolve

protected java.lang.Object readResolve()
Overrides:
readResolve in class Series

getAboveColor

public Color getAboveColor()
Funnel segment color if Opportunity value is greater than Quote value.
Default value: GREEN

Returns:
Color

setAboveColor

public void setAboveColor(Color value)
Funnel segment color if Opportunity value is greater than Quote value.
Default value: GREEN

Parameters:
value - Color

getWithinColor

public Color getWithinColor()
Funnel segment color if Opportunity value is within DifferenceLimit % below the Quote value.
Default value: YELLOW

Returns:
Color

setWithinColor

public void setWithinColor(Color value)
Funnel segment color if Opportunity value is within DifferenceLimit % below the Quote value.
Default value: YELLOW

Parameters:
value - Color

getBelowColor

public Color getBelowColor()
Funnel segment color if Opportunity value is more than the DifferenceLimit % below the Quote value.
Default value: RED

Returns:
Color

setBelowColor

public void setBelowColor(Color value)
Funnel segment color if Opportunity value is more than the DifferenceLimit % below the Quote value.
Default value: RED

Parameters:
value - Color

getPen

public ChartPen getPen()
Define Pen to draw the Funnel Chart.

Returns:
ChartPen

getLinesPen

public ChartPen getLinesPen()
Defines Pen to draw FunnelSeries bounding polygon.

Returns:
ChartPen

getBrush

public ChartBrush getBrush()
Defines Brush to fill Funnel Series.

Overrides:
getBrush in class Series
Returns:
ChartBrush

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 Series
Parameters:
c - IBaseChart

getMarkText

public java.lang.String getMarkText(int valueIndex)
Description copied from class: Series
Returns the String corresponding to the Series Mark text for a given ValueIndex point.
The Mark text depends on the Marks.Style method.

Specified by:
getMarkText in interface ISeries
Overrides:
getMarkText in class Series
Parameters:
valueIndex - int
Returns:
String

doBeforeDrawChart

public void doBeforeDrawChart()
Overrides:
doBeforeDrawChart in class Series

getCountLegendItems

public int getCountLegendItems()
Specified by:
getCountLegendItems in interface ISeries
Overrides:
getCountLegendItems in class Series

legendItemColor

public Color legendItemColor(int legendIndex)
Specified by:
legendItemColor in interface ISeries
Overrides:
legendItemColor in class Series

getLegendString

public java.lang.String getLegendString(int legendIndex,
                                        LegendTextStyle legendTextStyle)
Returns LegendString for LegendIndex'th item.

Specified by:
getLegendString in interface ISeries
Overrides:
getLegendString in class Series
Parameters:
legendIndex - int
legendTextStyle - LegendTextStyle
Returns:
String

add

public int add(double aQuote,
               double aOpportunity,
               java.lang.String aLabel,
               Color aColor,
               boolean aFunnel)

addSampleValues

protected void addSampleValues(int numValues)
Overrides:
addSampleValues in class Series

drawMark

protected void drawMark(int valueIndex,
                        java.lang.String st,
                        SeriesMarksPosition aPosition)
Overrides:
drawMark in class Series

getQuoteValues

public ValueList getQuoteValues()
Accesses the quote values of the FunnelSeries.

Returns:
ValueList

getDifferenceLimit

public double getDifferenceLimit()
The difference (expressed in Quote %) used to define the Funnel segment color.
If the Opportunity value falls below (100-Difference)*Quote/100 then the BelowColor will be used to paint the Funnel segment.
If the Opportunity value falls between (100-Difference)*Quote/100 and Quote, then the WithinColor will be used to paint the Funnel segment.
Otherwise (if Opportunity > Quote) the AboveColor will be used to paint the Funnel segment.
Default value: 30

Returns:
double

setDifferenceLimit

public void setDifferenceLimit(double value)
Sets the difference (expressed in Quote %) used to define the Funnel segment color.
Default value: 30

Parameters:
value - double

getMinYValue

public double getMinYValue()
Returns the Minimum Value of the Series Y Values List.
As some Series have more than one Y Values List, this Minimum Value is the "Minimum of Minimums" of all Series Y Values lists.

Overrides:
getMinYValue in class Series
Returns:
double

getMaxXValue

public double getMaxXValue()
Returns the Maximum Value of the Series X Values List.

Overrides:
getMaxXValue in class Series
Returns:
double

getMinXValue

public double getMinXValue()
Returns the Minimum Value of the Series X Values List.
As some Series have more than one Y Values List, this Minimum Value is the "Minimum of Minimums" of all Series Y Values lists.

Overrides:
getMinXValue in class Series
Returns:
double

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

getQuotesSorted

public boolean getQuotesSorted()
Sorts added segments by QuoteValues in descending order.
Setting QuotesSorted to false will enable the internal sorting algorithm.
Default value: false

Returns:
boolean

setQuotesSorted

public void setQuotesSorted(boolean value)
Sorts added segments by QuoteValues in descending order.
Default value: false

Parameters:
value - boolean

setOpportunityValues

public void setOpportunityValues(ValueList value)

getOpportunityValues

public ValueList getOpportunityValues()

getAutoUpdate

public boolean getAutoUpdate()
Reconstructs FunnelSeries with every added point.
To speed up the drawing of Funnel series, set the AutoUpdate to false and call the Recalculate method when all points are added.
Default value: true

Returns:
boolean

setAutoUpdate

public void setAutoUpdate(boolean value)
Reconstructs FunnelSeries with every added point.
Default value: true

Parameters:
value - boolean

reCalc

public void reCalc()
Uses all Quote and Opportunity values to restatic finalruct the Funnel chart.


addSegment

public int addSegment(double aQuote,
                      double aOpportunity,
                      java.lang.String aLabel,
                      Color aColor)
Adds new Funnel segment to the Series.

Parameters:
aQuote - double
aOpportunity - double
aLabel - String
aColor - Color
Returns:
int

draw

protected void draw()
Overrides:
draw in class Series

getDescription

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

Overrides:
getDescription in class Series
Returns:
String