Venice 0.751beta

nz.org.venice.chart.source
Interface GraphSource

All Known Implementing Classes:
OHLCVIndexQuoteGraphSource, OHLCVQuoteGraphSource, PortfolioGraphSource

public interface GraphSource

Provides an abstraction of the data being graphed, this way graphs do not need to know anything about the underlying data they are graphing.


Field Summary
static int ADVANCEDECLINE
           
static int INDEX
           
static int PORTFOLIO
           
static int SYMBOL
           
 
Method Summary
 void adjust(int type, double adjustValue, java.lang.Comparable startPoint, boolean direction)
          Apply an adjustment to the data.
 double[] getAcceptableMajorDeltas()
          Return an array of acceptable major deltas for the vertical axis.
 double[] getAcceptableMinorDeltas()
          Return an array of acceptable minor deltas for the vertical axis.
 Graphable getGraphable()
          Get the actual graphable data.
 java.lang.String getName()
          Return the name of the data.
 java.lang.String getToolTipText(java.lang.Comparable x)
          Get the tool tip text for the given X value
 int getType()
          Return the type of the data.
 java.lang.String getYLabel(double value)
          Convert the Y value to a label to be displayed in the vertical axis.
 

Field Detail

SYMBOL

public static final int SYMBOL
See Also:
Constant Field Values

INDEX

public static final int INDEX
See Also:
Constant Field Values

PORTFOLIO

public static final int PORTFOLIO
See Also:
Constant Field Values

ADVANCEDECLINE

public static final int ADVANCEDECLINE
See Also:
Constant Field Values
Method Detail

getName

public java.lang.String getName()
Return the name of the data.

Returns:
the name

getType

public int getType()
Return the type of the data.

Returns:
the type

getToolTipText

public java.lang.String getToolTipText(java.lang.Comparable x)
Get the tool tip text for the given X value

Parameters:
x - the X value
Returns:
the tooltip text

getYLabel

public java.lang.String getYLabel(double value)
Convert the Y value to a label to be displayed in the vertical axis.

Parameters:
value - y value
Returns:
the label text

getAcceptableMajorDeltas

public double[] getAcceptableMajorDeltas()
Return an array of acceptable major deltas for the vertical axis.

Returns:
array of doubles
See Also:
Graph.getAcceptableMajorDeltas()

getAcceptableMinorDeltas

public double[] getAcceptableMinorDeltas()
Return an array of acceptable minor deltas for the vertical axis.

Returns:
array of doubles
See Also:
Graph.getAcceptableMajorDeltas()

getGraphable

public Graphable getGraphable()
Get the actual graphable data.

Returns:
the graphable data

adjust

public void adjust(int type,
                   double adjustValue,
                   java.lang.Comparable startPoint,
                   boolean direction)
Apply an adjustment to the data.

Parameters:
type - A split or a dividend.
adjustValue - The value applied to each data point from start point.
startPoint - The point in the data from which to start adjusting.
direction - If true, will adjust the data in a positive direction.

Venice 0.751beta