Class AxesGraph
- java.lang.Object
-
- org.faceless.graph.Graph
-
- org.faceless.graph.AxesGraph
-
- Direct Known Subclasses:
AbstractBarGraph,AbstractLineGraph
public abstract class AxesGraph extends Graph
An Axes Graph covers every Graph that is plotted against an Axes. Currently this is everything but the
PieGraph.
-
-
Field Summary
Fields Modifier and Type Field Description protected doubleabsolutemaxyprotected doubleabsoluteminyprotected DoubleaxesmaxxSubclasses of AxesGraph can set the min and max values of the axes if they think they know best, or leave them set to NULL to allow the AxesGraph superclass to take it's best guess.protected DoubleaxesmaxySubclasses of AxesGraph can set the min and max values of the axes if they think they know best, or leave them set to NULL to allow the AxesGraph superclass to take it's best guess.protected DoubleaxesmaxzSubclasses of AxesGraph can set the min and max values of the axes if they think they know best, or leave them set to NULL to allow the AxesGraph superclass to take it's best guess.protected DoubleaxesminxSubclasses of AxesGraph can set the min and max values of the axes if they think they know best, or leave them set to NULL to allow the AxesGraph superclass to take it's best guess.protected DoubleaxesminySubclasses of AxesGraph can set the min and max values of the axes if they think they know best, or leave them set to NULL to allow the AxesGraph superclass to take it's best guess.protected DoubleaxesminzSubclasses of AxesGraph can set the min and max values of the axes if they think they know best, or leave them set to NULL to allow the AxesGraph superclass to take it's best guess.protected Styleaxesstyleprotected Styleboxstyleprotected org.faceless.graph.DataSetdataThe data array.protected Stylexaxeslabelstyleprotected Stylexaxestextstyleprotected booleanxfloatWhether the subclass feels that the X,Y or Z axis should be plotted using aFloatingPointFormatteror anIntegerFormatterprotected FormatterxformatterWhich formatter to use for the X, Y or Z axis.protected Stylexwallstyleprotected Styleyaxeslabelstyleprotected Styleyaxestextstyleprotected booleanyfloatWhether the subclass feels that the X,Y or Z axis should be plotted using aFloatingPointFormatteror anIntegerFormatterprotected FormatteryformatterWhich formatter to use for the X, Y or Z axis.protected Styleywallstyleprotected Stylezaxestextstyleprotected booleanzfloatWhether the subclass feels that the X,Y or Z axis should be plotted using aFloatingPointFormatteror anIntegerFormatterprotected FormatterzformatterWhich formatter to use for the X, Y or Z axis.protected Stylezwallstyle-
Fields inherited from class org.faceless.graph.Graph
canvas, key, KEY_BOXED_BOTTOM, KEY_BOXED_LEFT, KEY_BOXED_RIGHT, KEY_BOXED_TOP, KEY_NONE, keyboxstyle, keypadding, keystyle, keytype, subtitle, subtitlestyle, title, titlepadding, titlestyle, xrotation, yrotation, zrotation
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAxesGraph()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidoptionAxisStyle(Style val)What style to draw the principal axes for the graph in.voidoptionBoxColor(Color val)What color, if any, to draw the box around the content of the graph (excluding the values on the axes).voidoptionFloorStyle(Style val)What style, if any, to draw the grid on the floor of the graph (either where y=0 or y=min(y) - seeoptionXAxisAtZero).voidoptionMaxY(double val)The maximum value to plot on the Y axis.voidoptionMinY(double val)The minimum value to plot on the Y axis.voidoptionXAxisAtZero(boolean val)If the Y-axis values go from -ve to +ve, whether to draw the X-Axis where y=0 or where y=min(y)voidoptionXAxisLabel(String val)The label to give the X-AxisvoidoptionXAxisLabelStyle(Style val)Set the style to write the label for the X-AxisvoidoptionXAxisStyle(Style val)What Style to write the values on the X-AxisvoidoptionXAxisTextRotation(double val)Whether to rotate the values on the Y-Axis.voidoptionXFormatter(Formatter val)Which {link org.faceless.graph.formatter.Formatter} to use to format the values on the X axis.voidoptionXStretchToZero(boolean val)Whether to always stretch the X axis to include zero.voidoptionYAxisAtZero(boolean val)If the X-axis values go from -ve to +ve, whether to draw the Y-Axis where x=0 or where x=min(x)voidoptionYAxisLabel(String val)The label to give the Y-AxisvoidoptionYAxisLabelStyle(Style val)Set the style to write the label for the Y-AxisvoidoptionYAxisStyle(Style val)What Style to write the values on the Y-AxisvoidoptionYAxisTextRotation(double val)Whether to rotate the values on the X-Axis.voidoptionYFormatter(Formatter val)Which {link org.faceless.graph.formatter.Formatter} to use to format the values on the Y axis.voidoptionYStretchToZero(boolean val)Whether to always stretch the Y axis to include zero.voidoptionYWallStyle(Style val)What style, if any, to draw the grid on the Y-Wall of the graph (either where x=0 or x=min(x) - seeoptionYAxisAtZero).voidoptionZAxisStyle(Style val)What Style to write the values on the Z-AxisvoidoptionZFormatter(Formatter val)Which {link org.faceless.graph.formatter.Formatter} to use to format the values on the Z axis.voidoptionZWallStyle(Style val)What style, if any, to draw the grid on the back or Z-Wall of the graph.protected voidpostcomplete()PostComplete is called by a Graph when it's rendered, but after complete.protected voidpostpostcomplete()The unfortunately named PostPostComplete is called last of all by a Graph when it's rendered, to add anything that couldn't quite be laid out correctly on the last pass - usually Text dependant on the position of other text.protected voidprescalecomplete()-
Methods inherited from class org.faceless.graph.Graph
addElement, complete, getDefaultBorderColor, getFontScale, optionDisplayKey, optionFixedAspectRatio, optionKeyBoxStyle, optionKeyStyle, optionRemoveBackFace, optionSubTitle, optionSubTitleStyle, optionTitle, optionTitleStyle, optionXRotation, optionYRotation, optionZRotation, setDefaultBorderColor, setDefaultColors, setDefaultLineThickness, setFontScale, setLicenseKey, setLightLevel, setLightVector, setPieEdgeDegrees, toCanvas
-
-
-
-
Field Detail
-
axesminx
protected Double axesminx
Subclasses of AxesGraph can set the min and max values of the axes if they think they know best, or leave them set to NULL to allow the AxesGraph superclass to take it's best guess.
-
axesmaxx
protected Double axesmaxx
Subclasses of AxesGraph can set the min and max values of the axes if they think they know best, or leave them set to NULL to allow the AxesGraph superclass to take it's best guess.
-
axesminy
protected Double axesminy
Subclasses of AxesGraph can set the min and max values of the axes if they think they know best, or leave them set to NULL to allow the AxesGraph superclass to take it's best guess.
-
axesmaxy
protected Double axesmaxy
Subclasses of AxesGraph can set the min and max values of the axes if they think they know best, or leave them set to NULL to allow the AxesGraph superclass to take it's best guess.
-
axesminz
protected Double axesminz
Subclasses of AxesGraph can set the min and max values of the axes if they think they know best, or leave them set to NULL to allow the AxesGraph superclass to take it's best guess.
-
axesmaxz
protected Double axesmaxz
Subclasses of AxesGraph can set the min and max values of the axes if they think they know best, or leave them set to NULL to allow the AxesGraph superclass to take it's best guess.
-
absolutemaxy
protected double absolutemaxy
-
absoluteminy
protected double absoluteminy
-
data
protected org.faceless.graph.DataSet data
The data array.
-
axesstyle
protected Style axesstyle
-
zwallstyle
protected Style zwallstyle
-
ywallstyle
protected Style ywallstyle
-
xwallstyle
protected Style xwallstyle
-
yaxestextstyle
protected Style yaxestextstyle
-
xaxestextstyle
protected Style xaxestextstyle
-
zaxestextstyle
protected Style zaxestextstyle
-
xaxeslabelstyle
protected Style xaxeslabelstyle
-
yaxeslabelstyle
protected Style yaxeslabelstyle
-
boxstyle
protected Style boxstyle
-
zfloat
protected boolean zfloat
Whether the subclass feels that the X,Y or Z axis should be plotted using aFloatingPointFormatteror anIntegerFormatter
-
yfloat
protected boolean yfloat
Whether the subclass feels that the X,Y or Z axis should be plotted using aFloatingPointFormatteror anIntegerFormatter
-
xfloat
protected boolean xfloat
Whether the subclass feels that the X,Y or Z axis should be plotted using aFloatingPointFormatteror anIntegerFormatter
-
xformatter
protected Formatter xformatter
Which formatter to use for the X, Y or Z axis.
-
yformatter
protected Formatter yformatter
Which formatter to use for the X, Y or Z axis.
-
zformatter
protected Formatter zformatter
Which formatter to use for the X, Y or Z axis.
-
-
Method Detail
-
optionXAxisLabel
public void optionXAxisLabel(String val)
The label to give the X-AxisDefault: <none>
-
optionYAxisLabel
public void optionYAxisLabel(String val)
The label to give the Y-AxisDefault: <none>
-
optionXAxisLabelStyle
public void optionXAxisLabelStyle(Style val)
Set the style to write the label for the X-AxisDefault: Black 12pt Helvetica
-
optionYAxisLabelStyle
public void optionYAxisLabelStyle(Style val)
Set the style to write the label for the Y-AxisDefault: Black 12pt Helvetica
-
optionXAxisAtZero
public void optionXAxisAtZero(boolean val)
If the Y-axis values go from -ve to +ve, whether to draw the X-Axis where y=0 or where y=min(y)Default: false except for the subclass
LineGraph, which is true
-
optionYAxisAtZero
public void optionYAxisAtZero(boolean val)
If the X-axis values go from -ve to +ve, whether to draw the Y-Axis where x=0 or where x=min(x)Default: false except for the subclass
LineGraph, which is true
-
optionXStretchToZero
public void optionXStretchToZero(boolean val)
Whether to always stretch the X axis to include zero. Some subclasses (e.g.AbstractBarGraph) may not allow you to set this value.Default: usually false, but depends on subclass
-
optionYStretchToZero
public void optionYStretchToZero(boolean val)
Whether to always stretch the Y axis to include zero. Some subclasses (e.g.AbstractBarGraph) may not allow you to set this value.Default: usually false, but depends on subclass
-
optionFloorStyle
public void optionFloorStyle(Style val)
What style, if any, to draw the grid on the floor of the graph (either where y=0 or y=min(y) - seeoptionXAxisAtZero). You can set the color and border color, or just set the border color for a grid on an otherwise transparent wall.Default: null
-
optionYWallStyle
public void optionYWallStyle(Style val)
What style, if any, to draw the grid on the Y-Wall of the graph (either where x=0 or x=min(x) - seeoptionYAxisAtZero). You can set the color and border color, or just set the border color for a grid on an otherwise transparent wall.Default: null
-
optionZWallStyle
public void optionZWallStyle(Style val)
What style, if any, to draw the grid on the back or Z-Wall of the graph. You can set the color and border color, or just set the border color for a grid on an otherwise transparent wall.Default: null
-
optionXAxisStyle
public void optionXAxisStyle(Style val)
What Style to write the values on the X-AxisDefault: Black 8pt Helvetica
-
optionYAxisStyle
public void optionYAxisStyle(Style val)
What Style to write the values on the Y-AxisDefault: Black 8pt Helvetica
-
optionZAxisStyle
public void optionZAxisStyle(Style val)
What Style to write the values on the Z-AxisDefault: Black 8pt Helvetica
-
optionYAxisTextRotation
public void optionYAxisTextRotation(double val)
Whether to rotate the values on the X-Axis. Likely values are 0 (horizontal), 90 (vertical) or anything inbetween. This can also be set directly in the style passed tooptionXAxisStyleDefault: 0
-
optionXAxisTextRotation
public void optionXAxisTextRotation(double val)
Whether to rotate the values on the Y-Axis. Likely values are 0 (horizontal), 90 (vertical) or anything inbetween. This can also be set directly in the style passed tooptionYAxisStyleDefault: 0
-
optionXFormatter
public void optionXFormatter(Formatter val)
Which {link org.faceless.graph.formatter.Formatter} to use to format the values on the X axis. The default depends on the subclass and the data. To turn off the display of this axis, set tonewNullFormatterDefault: data and class dependent
-
optionYFormatter
public void optionYFormatter(Formatter val)
Which {link org.faceless.graph.formatter.Formatter} to use to format the values on the Y axis. The default depends on the subclass and the data. To turn off the display of this axis, set tonewNullFormatterDefault: data and class dependent
-
optionZFormatter
public void optionZFormatter(Formatter val)
Which {link org.faceless.graph.formatter.Formatter} to use to format the values on the Z axis. The default depends on the subclass and the data. To turn off the display of this axis, set tonewNullFormatterDefault: data and class dependent
-
optionAxisStyle
public void optionAxisStyle(Style val)
What style to draw the principal axes for the graph in.Default:
Style.getDefaultBorderColor()
-
optionBoxColor
public void optionBoxColor(Color val)
What color, if any, to draw the box around the content of the graph (excluding the values on the axes). Set to null for no box.Default: null
-
optionMinY
public void optionMinY(double val)
The minimum value to plot on the Y axis. Set this to plot useful values for curves like tangents, that give infinite values at certain points, or to just plot the tops of Bar Graphs or Area Graphs.Note that if a data sample falls outside this value, that value will take precedence.
Default: -Infinity for Line Graphs, zero for Bar Graphs and Area Graphs
- Since:
- 1.0.5 for BarGraphs
-
optionMaxY
public void optionMaxY(double val)
The maximum value to plot on the Y axis. Set this to plot useful values for curves like tangents, that give infinite values at certain points, or extend the top of the graph beyond the maximum value of the data.Note that if a data sample falls outside this value, that value will take precedence.
Default: +Infinity
- Since:
- 1.0.5 for BarGraphs
-
postcomplete
protected void postcomplete()
Description copied from class:GraphPostComplete is called by a Graph when it's rendered, but after complete. It should add any elements that are required but couldn't be calculated until afterGraph.complete()(the axes in an axes graph are an example). The last thing it should do before returning is callsuper.postcomplete()- Overrides:
postcompletein classGraph
-
prescalecomplete
protected void prescalecomplete()
-
postpostcomplete
protected void postpostcomplete()
Description copied from class:GraphThe unfortunately named PostPostComplete is called last of all by a Graph when it's rendered, to add anything that couldn't quite be laid out correctly on the last pass - usually Text dependant on the position of other text. The last thing it should do before returning is callsuper.postpostcomplete()- Overrides:
postpostcompletein classGraph
-
-