|
Venice 0.8alpha | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnz.org.venice.chart.graph.AbstractGraph
nz.org.venice.chart.graph.BarChartGraph
public class BarChartGraph
Barchart graph. This graph draws a single vertical line between the day low and the day high values and draws horizontal bars at the day open and the day close.
| Field Summary |
|---|
| Fields inherited from interface nz.org.venice.chart.graph.Graph |
|---|
TOOL_TIP_BUFFER |
| Constructor Summary | |
|---|---|
BarChartGraph(GraphSource dayOpen,
GraphSource dayLow,
GraphSource dayHigh,
GraphSource dayClose)
Create a new barchart graph. |
|
| Method Summary | |
|---|---|
double |
getHighestY(java.util.List x)
Return the highest Y value in the given X range. |
double |
getLowestY(java.util.List x)
Return the loweset Y value in the given X range. |
java.lang.String |
getName()
Return the name of this graph. |
java.lang.String |
getToolTipText(java.lang.Comparable x,
int y,
int yoffset,
double verticalScale,
double bottomLineValue)
Get the tool tip text for the given X value and y coordinate. |
boolean |
isPrimary()
Return whether the graph is a primary graph. |
void |
render(java.awt.Graphics g,
java.awt.Color c,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double bottomLineValue,
java.util.List xRange)
|
void |
render(java.awt.Graphics g,
java.awt.Color c,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double bottomLineValue,
java.util.List xRange,
boolean vertOrientation)
Draw the graph. |
| Methods inherited from class nz.org.venice.chart.graph.AbstractGraph |
|---|
dataAvailable, getAcceptableMajorDeltas, getAcceptableMinorDeltas, getEndX, getSettings, getSource, getSourceName, getStartX, getUI, getXRange, getY, getYLabel, setSettings |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BarChartGraph(GraphSource dayOpen,
GraphSource dayLow,
GraphSource dayHigh,
GraphSource dayClose)
dayOpen - source containing the day open valuesdayLow - source containing the day low valuesdayHigh - source containing the day high valuesdayClose - source containing the day close values| Method Detail |
|---|
public void render(java.awt.Graphics g,
java.awt.Color c,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double bottomLineValue,
java.util.List xRange)
public void render(java.awt.Graphics g,
java.awt.Color c,
int xoffset,
int yoffset,
double horizontalScale,
double verticalScale,
double bottomLineValue,
java.util.List xRange,
boolean vertOrientation)
Graph
g - the Graphics object to render toc - the colour the graph should be rendered in; override
this if the graph should be drawn in
a certain colour - such as a Moving Average graphxoffset - the x offset in the graphics object where the graph
startsyoffset - the y offset in the graphics object where the graph
startshorizontalScale - horizontal scale factor; use this to convert
between X value in the xRange to a
cartesian coordinate xverticalScale - vertical scale factor; use this to convert
between Y value to a cartesian coordinate ybottomLineValue - the Y value of the lowest line in the graphxRange - a List of Comparable
that contain the X values to plotvertOrientation - true if increasing y values mean decreasing Y values
public java.lang.String getToolTipText(java.lang.Comparable x,
int y,
int yoffset,
double verticalScale,
double bottomLineValue)
getToolTipText in interface GraphgetToolTipText in class AbstractGraphx - the X valuey - the y coordinateyoffset - y offset from top of graphverticalScale - vertical scale factorbottomLineValue - the Y value of the lowest line in the graph
public double getHighestY(java.util.List x)
AbstractGraph
getHighestY in interface GraphgetHighestY in class AbstractGraphx - range of X values
GraphSourcepublic double getLowestY(java.util.List x)
AbstractGraph
getLowestY in interface GraphgetLowestY in class AbstractGraphx - range of X values
GraphSourcepublic java.lang.String getName()
Bar Chartpublic boolean isPrimary()
Graph
true if the graph is a primary graph
|
Venice 0.8alpha | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||