Class AbstractGraph.GraphStyle

Object
GraphStyle
Enclosing class:
AbstractGraph<B>

public static class AbstractGraph.GraphStyle extends Object
The style features for graphs. This is a collection of settings for line styles, font sizes, ticks, padding, etc.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean
    The flag to indicate whether to auto-scale the horizontal axis.
    boolean
    The flag to indicate whether to auto-scale the vertical axis.
    The font for the axis labels as a CSS string.
    The backgorund color of the graph.
    The color of the custom levels.
    double[]
    The array with x-values to draw custom vertical levels.
    double[]
    The array with y-values to draw custom horizontal levels.
    int[]
    The dashing pattern for a dashed line.
    int[]
    The dashing pattern for a dotted line.
    The color to mark end of trajectory.
    The color of the frame.
    double
    The stroke width of the frame.
    The color for drawing the graph.
    The label of the graph (if any).
    The color of the label of the graph.
    The font for the graph label as a CSS string.
    The color of the levels.
    double
    The stroke width of the levels.
    double
    The stroke width of lines on the graph.
    The color of links on the graph.
    double
    The stroke width of links on the graph.
    double
    The radius of marker points.
    int
    The minimum padding (in pixels) between boundaries of the HTML element and the graph.
    boolean
    The flag to indicate whether tick marks along the horizontal axis are in percent.
    boolean
    The flag to indicate whether tick marks along the vertical axis are in percent.
    boolean
    The flag to indicate whether to show decorations of the frame (ticks and labels).
    boolean
    The flag to indicate whether to show the frame of the graph.
    boolean
    The flag to indicate whether to show the graph label.
    boolean
    The flag to indicate whether to show the x-axis label.
    boolean
    The flag to indicate whether vertical levels are shown.
    boolean
    The flag to indicate whether to show tick labels along the horizontal axis.
    boolean
    The flag to indicate whether tick labels along the horizontal axis are shown.
    boolean
    The flag to indicate whether to show the y-axis label.
    boolean
    The flag to indicate whether horizontal levels are shown.
    boolean
    The flag to indicate whether to show tick labels along the vertical axis.
    boolean
    The flag to indicate whether tick labels along the vertical axis are shown.
    int[]
    The dashing pattern for a dashed line.
    The color to mark start of trajectory.
    int
    The tick length in pixels.
    The font for the axis tick labels label as a CSS string.
    The color of trajectories.
    double
    The x-axis increments.
    The x-axis label of the graph (if any).
    double
    The maximum value of the x-axis.
    double
    The minimum value of the x-axis.
    double
    The x-axis increments.
    The y-axis label of the graph (if any).
    double
    The maximum value of the y-axis.
    double
    The minimum value of the y-axis.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Create a new graph style.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setXRange(int xSteps)
    Set the range of the horizontal axis to xSteps * xIncr.
    void
    setYRange(int ySteps)
    Set the range of the vertical axis to ySteps * yIncr.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • minPadding

      public int minPadding
      The minimum padding (in pixels) between boundaries of the HTML element and the graph.
    • tickLength

      public int tickLength
      The tick length in pixels.
    • markerSize

      public double markerSize
      The radius of marker points.
    • startColor

      public String startColor
      The color to mark start of trajectory.
    • endColor

      public String endColor
      The color to mark end of trajectory.
    • xMin

      public double xMin
      The minimum value of the x-axis.
    • xMax

      public double xMax
      The maximum value of the x-axis.
    • xIncr

      public double xIncr
      The x-axis increments.
    • yMin

      public double yMin
      The minimum value of the y-axis.
    • yMax

      public double yMax
      The maximum value of the y-axis.
    • yIncr

      public double yIncr
      The x-axis increments.
    • autoscaleX

      public boolean autoscaleX
      The flag to indicate whether to auto-scale the horizontal axis.
    • autoscaleY

      public boolean autoscaleY
      The flag to indicate whether to auto-scale the vertical axis.
    • percentX

      public boolean percentX
      The flag to indicate whether tick marks along the horizontal axis are in percent.
    • percentY

      public boolean percentY
      The flag to indicate whether tick marks along the vertical axis are in percent.
    • label

      public String label
      The label of the graph (if any).
    • xLabel

      public String xLabel
      The x-axis label of the graph (if any).
    • yLabel

      public String yLabel
      The y-axis label of the graph (if any).
    • showLabel

      public boolean showLabel
      The flag to indicate whether to show the graph label.
    • showXLabel

      public boolean showXLabel
      The flag to indicate whether to show the x-axis label.
    • showYLabel

      public boolean showYLabel
      The flag to indicate whether to show the y-axis label.
    • showXTickLabels

      public boolean showXTickLabels
      The flag to indicate whether to show tick labels along the horizontal axis.
    • showYTickLabels

      public boolean showYTickLabels
      The flag to indicate whether to show tick labels along the vertical axis.
    • showFrame

      public boolean showFrame
      The flag to indicate whether to show the frame of the graph.
    • showDecoratedFrame

      public boolean showDecoratedFrame
      The flag to indicate whether to show decorations of the frame (ticks and labels).

      Note: somewhat hackish... used to force showing axes for 2D histograms (as opposed to plain frame for e.g. lattices)

    • showXLevels

      public boolean showXLevels
      The flag to indicate whether vertical levels are shown.
    • showYLevels

      public boolean showYLevels
      The flag to indicate whether horizontal levels are shown.
    • showXTicks

      public boolean showXTicks
      The flag to indicate whether tick labels along the horizontal axis are shown.
    • showYTicks

      public boolean showYTicks
      The flag to indicate whether tick labels along the vertical axis are shown.
    • customXLevels

      public double[] customXLevels
      The array with x-values to draw custom vertical levels.
    • customYLevels

      public double[] customYLevels
      The array with y-values to draw custom horizontal levels.
    • frameWidth

      public double frameWidth
      The stroke width of the frame.
    • levelWidth

      public double levelWidth
      The stroke width of the levels.
    • lineWidth

      public double lineWidth
      The stroke width of lines on the graph.
    • solidLine

      public int[] solidLine
      The dashing pattern for a dashed line.
    • dashedLine

      public int[] dashedLine
      The dashing pattern for a dashed line.
    • dottedLine

      public int[] dottedLine
      The dashing pattern for a dotted line.
    • linkWidth

      public double linkWidth
      The stroke width of links on the graph.
    • frameColor

      public String frameColor
      The color of the frame.
    • levelColor

      public String levelColor
      The color of the levels.
    • customLevelColor

      public String customLevelColor
      The color of the custom levels.
    • bgColor

      public String bgColor
      The backgorund color of the graph.
    • labelColor

      public String labelColor
      The color of the label of the graph.
    • graphColor

      public String graphColor
      The color for drawing the graph.
    • linkColor

      public String linkColor
      The color of links on the graph.
    • trajColor

      public String trajColor
      The color of trajectories.
      See Also:
    • labelFont

      public String labelFont
      The font for the graph label as a CSS string.
    • axisLabelFont

      public String axisLabelFont
      The font for the axis labels as a CSS string.
    • ticksLabelFont

      public String ticksLabelFont
      The font for the axis tick labels label as a CSS string.
  • Constructor Details

    • GraphStyle

      public GraphStyle()
      Create a new graph style.
  • Method Details

    • setXRange

      public void setXRange(int xSteps)
      Set the range of the horizontal axis to xSteps * xIncr.
      Parameters:
      xSteps - the number of horizontal steps
    • setYRange

      public void setYRange(int ySteps)
      Set the range of the vertical axis to ySteps * yIncr.
      Parameters:
      ySteps - the number of vertical steps