Package quadbase.util

Interface IAxis


public interface IAxis
This interface is used to set/get different properties associated with a chart's axis. User's can get a handle to an object of this type by calling the following functions defined in QbChart.
     gethXAxis()
     gethYAxis()
     gethZAxis()
     getAxis(int index)
 
Various properties for an axis can be set/get by using the handle obtained for that axis as described above.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    This function is used to check if the tickers are drawn inward for the given axis.
    boolean
    This function is used to check if the tickers are drawn for the given axis.
    double
    This function is used to return a base for logarithmic for that axis.
    Retrieve the color used to draw the axis.
    This function is used to get the grid color of the axis(2D) or wall(3D).
    double
    This function returns grid height ratio for 2D chart.
    int
    This function returns the line style value of the X/Y grid lines.
    int
    This function returns the thickness value of the X/Y grid lines.
    This function is used to get a handle to ILabel, which is used to set properties associated with the labels for the axis.
    This function is used to get a handle to ITextString, which is used to set properties associated with the title for the axis.
    This function is used to get the label format for the given axis.
    int
    This function returns the number of rows used to display the x labels.
    int
    This function returns the step size for the label display.
    int
    This function is used to obtain the unit information of the label Label unit is associated with the individual column not the axis.
    boolean
    This function is used to check if sub-tickers are drawn for that axis.
    Log scale must be on and log base must be 10.
    int
    This function returns the max number of the label and ticker display.
    Returns the maximum scale value that was defined for this axis.
    Returns the minimum scale value that was defined for this axis.
    Returns the offset of the x-axis origin from the 0th position.
    getOriginalTickerLabels(boolean formatedLabel)
    This function is used to get the original ticker labels or formatted ticker labels.
    Retruns the scale step size(interval) for this axis.
    int
    This function is used to get the axis line thickness for a 2D chart.
    This function is used to get the ticker color of the axis(2D) or wall(3D).
    int
    This function is used to get the ticker labels count.
    int
    This function is used to retrieve the ticker step size for the given axis.
    boolean
    This function is used to check if arrow heads are currently drawn on the axes of the chart.
    boolean
    This function is used to check if the axis padding is added or not.
    boolean
    Returns if the value axis label are displayed in DateTimeFormat, as opposed to NumericFormat.
    boolean
    Returns the state of the x-axis label display in day of the week fashion.
    boolean
    Checks if numeric inputs for this axis is being displayed in the DateTime format.
    boolean
    This function is used to check if grid lines are aligned with tickers.
    boolean
    This function is used to check if grid lines are in front of the chart.
    boolean
    This function returns the drawing status of the axis/wall grid.
    boolean
    This function is used to check if the tickers and labels are drawn outside chart plot area.
    boolean
    This function is used to check if a logarithmic scale is plotted for that axis.
    boolean
    This function is used to check if the origin is calculated automatically or not The axis being checked depends on the axis handle used.
    boolean
    This function is used to check if the scale min, max, and step sizes are calculated automatically or not.
    boolean
    This function is used to check if a logarithmic value is shown for that axis.
    boolean
    This function returns the status of skipping gridline offset.
    boolean
    Get the display status of the x, y, or z axis (2D) or xy, yz, xz wall (3D) for the chart.
    void
    setArrowhead(boolean drawArrows)
    This function is used to draw/hide arrow heads on the axes in the chart.
    void
    This function is used to enable/ disable adding axis padding.
    void
    setBaseForLog(double logBase)
    This function is used to set a base for logarithmic for that axis.
    void
    Set the color for all the axes.
    void
    setDateTimeDisplay(boolean state)
    Specifies if the value axis labels are displayed in the DateTimeFormat
    void
    setDisplayByWeek(boolean state)
    Sets the state of the x-axis label display in day of the week fashion.
    void
    Sets numeric inputs for this axis to be displayed in the DateTime format.
    void
    This function enables/disables the alignment between grid lines and tickers.
    void
    This function sets the grid color of the axis or wall.
    void
    setGridHeightRatio(double ratio)
    This function sets the grid height ratio for 2D chart.
    void
    setGridInFront(boolean b)
    Bring the grid to the front.
    void
    This function sets the line style of the x/y grid lines.
    void
    This function sets the thickness of the x/y grid lines.
    void
    setGridVisible(boolean b)
    This function enables/disables the drawing of grid lines for the axis associated with this object.
    void
    This function sets the label format for the given axis.
    void
    This function is used to draw tickers and labels inside/outside chart plot area for the given axis.
    void
    setLabelRowCount(int numRows)
    This function is used to set the number of rows used to display x-axis labels.
    void
    setLabelStep(int size)
    This function sets the label step size for the given axis.
    void
    setLogScale(boolean b)
    This function enables/disables log scale plotting for the given axis.
    void
    setLogSubTickersState(boolean state)
    This function enables/disables sub-tickers for that axis.
    Log scale must be on and log base must be 10.
    void
    This function sets the max number of display label and ticker for the given axis.
    void
    setMaxScale(Number maxScale)
    Sets the maximum scale value for this axis.
    void
    setMinScale(Number minScale)
    Sets the minimum scale value for this axis.
    void
    Sets the offset of the x-axis from the origin.
    void
    setOriginAutomatic(boolean b)
    This function is used to enable/disable auto calculation of origin.
    void
    setScaleAutomatic(boolean b)
    This function is used to enable/disable auto calculation of scales.
    void
    setScaleStep(int yr, int mo, int dd, int hr, int min)
    Sets the scalestep value for this axis.  Used when the scale step uses a date/time/timestamp instead of a number.
    void
    setScaleStep(Number scaleStep)
    Sets the scale step size(interval) for this axis.
    void
    setShowLogValue(boolean b)
    This function enables/disables show log value for the given axis.
    void
    setSkipGridOffset(boolean b)
    This function enables/disables grid line offset for the axis associated with this object.
    void
    setThickness(int t)
    This function is used to set the axis line thickness for a 2D chart.
    void
    This function sets the ticker color of the axis or wall.
    void
    This function is used to set the ticker labels for the given axis.
    void
    setTickersInward(boolean b)
    This function is used to decide the axis tickers drawing direction.
    void
    setTickerStep(int stepSize)
    This function is used to set the ticker step size for a particular axis.
    void
    setTickersVisible(boolean b)
    This function is used to enable/disable axis tickers rendering for the given axis.
    void
    setVisible(boolean b)
    Enables/Disables the display of the particular chart axis or wall.
  • Method Details

    • getColor

      Color getColor()
      Retrieve the color used to draw the axis.

      Associated QbChart property: AXIS_COLOR

      Note: This method returns the same value for all the axes. i.e. all the axes share the same color.

      Returns:
      Color An object of type Color for all the axes.
    • setColor

      void setColor(Color c)
      Set the color for all the axes.

      Associated QbChart property: AXIS_COLOR

      Note: All the axes share the same color value.

      Parameters:
      c - An object of type Color, used to set the color for that axis.
    • hasArrowhead

      boolean hasArrowhead()
      This function is used to check if arrow heads are currently drawn on the axes of the chart.

      Associated QbChart property: DRAW_ARROWHEAD

      Returns:
      boolean True if arrowheads are currently displayed. False otherwise.
    • setArrowhead

      void setArrowhead(boolean drawArrows)
      This function is used to draw/hide arrow heads on the axes in the chart.

      Associated QbChart property: DRAW_ARROWHEAD

      Note: It applies to all the axes. i.e. Arrowheads, when enabled, appear on ALL the axes.

      Parameters:
      drawArrows - set to true if arrow heads are desired.
    • getThickness

      int getThickness()
      This function is used to get the axis line thickness for a 2D chart.

      Associated QbChart property: AXISLINE_THICKNESS

      Returns:
      The thickness value associated with the axes as an integer.
    • setThickness

      void setThickness(int t)
      This function is used to set the axis line thickness for a 2D chart. The line thickness is set for all the axes at the same time.

      Associated QbChart property: AXISLINE_THICKNESS

      Parameters:
      t - The thickness (int) desired for the axes.
    • isVisible

      boolean isVisible()
      Get the display status of the x, y, or z axis (2D) or xy, yz, xz wall (3D) for the chart. The particular axis or plane checked depends on the axis handle being used to call this function.

      Associated QbChart property:

       
                 DRAW_XAXIS
                 DRAW_YAXIS
                 DRAW_ZAXIS
       
       
      Returns:
      True if axis/plane is displayed, False otherwise
    • setVisible

      void setVisible(boolean b)
      Enables/Disables the display of the particular chart axis or wall. Again, the axis or wall changed depends upon the axis handle used.

      Associated QbChart property:

       
                 DRAW_XAXIS
                 DRAW_YAXIS
                 DRAW_ZAXIS
       
       
      Parameters:
      b - True if axis/wall needs to be displayed. False otherwise.
    • isScaleAutomatic

      boolean isScaleAutomatic()
      This function is used to check if the scale min, max, and step sizes are calculated automatically or not. The axis being checked depends on the axis handle used.

      Associated QbChart property:

       
                 XAXIS_AUTOSCALE
                 YAXIS_AUTOSCALE
                 ZAXIS_AUTOSCALE
       
       
      Returns:
      True if the scale min, max, and step values are automatic.
    • setScaleAutomatic

      void setScaleAutomatic(boolean b)
      This function is used to enable/disable auto calculation of scales.
      Parameters:
      b - True if auto scale is desired, false otherwise.
      See Also:
    • isOriginAutomatic

      boolean isOriginAutomatic()
      This function is used to check if the origin is calculated automatically or not The axis being checked depends on the axis handle used.

      Associated QbChart property:

       
                 XAXIS_AUTOSCALE
                 YAXIS_AUTOSCALE
                 ZAXIS_AUTOSCALE
       
       
      Returns:
      True if the origin value is automatic.
    • setOriginAutomatic

      void setOriginAutomatic(boolean b)
      This function is used to enable/disable auto calculation of origin.
      Parameters:
      b - True if auto origin is desired, false otherwise.
      See Also:
    • isAxisPaddingAdded

      boolean isAxisPaddingAdded()
      This function is used to check if the axis padding is added or not. This feature only works for auto scale.
      Returns:
      True if axis padding is added.
    • setAxisPaddingAdded

      void setAxisPaddingAdded(boolean b)
      This function is used to enable/ disable adding axis padding. This feature only works for auto scale.
      Parameters:
      b - True if adding axis padding is desired, false otherwise.
      See Also:
    • isLogScale

      boolean isLogScale()
      This function is used to check if a logarithmic scale is plotted for that axis. The axis being checked depends on the axis handle used.

      Associated QbChart properties:

       
                  XAXIS_LOGSCALE
                  YAXIS_LOGSCALE
                  ZAXIS_LOGSCALE
       
       
      Returns:
      true if the scale is logarithmic, false otherwise.
    • setLogScale

      void setLogScale(boolean b)
      This function enables/disables log scale plotting for the given axis.
      Parameters:
      b - True if a log scale is desired, false otherwise.
      See Also:
    • getBaseForLog

      double getBaseForLog()
      This function is used to return a base for logarithmic for that axis. The axis being checked depends on the axis handle used.
      Returns:
      log base.
    • setBaseForLog

      void setBaseForLog(double logBase)
      This function is used to set a base for logarithmic for that axis. The axis being checked depends on the axis handle used.
      Parameters:
      logBase - value of logarithmic base.
    • getLogSubTickersState

      boolean getLogSubTickersState()
      This function is used to check if sub-tickers are drawn for that axis.
      Log scale must be on and log base must be 10.
      Returns:
      the state of log sub-tickers.
    • setLogSubTickersState

      void setLogSubTickersState(boolean state)
      This function enables/disables sub-tickers for that axis.
      Log scale must be on and log base must be 10.
      Parameters:
      state - the state of log sub-tickers.
    • isShowLogValue

      boolean isShowLogValue()
      This function is used to check if a logarithmic value is shown for that axis. The axis being checked depends on the axis handle used.
      Returns:
      true if logarithmic value is shown, false otherwise.
    • setShowLogValue

      void setShowLogValue(boolean b)
      This function enables/disables show log value for the given axis.
      Parameters:
      b - True if a log value is shown, false otherwise.
      See Also:
    • gethTitle

      ITextString gethTitle()
      This function is used to get a handle to ITextString, which is used to set properties associated with the title for the axis.
      Returns:
      An object of type ITextString
      See Also:
    • gethLabel

      ILabel gethLabel()
      This function is used to get a handle to ILabel, which is used to set properties associated with the labels for the axis.
      Returns:
      An object of type ILabel
      See Also:
    • getLabelRowCount

      int getLabelRowCount()
      This function returns the number of rows used to display the x labels. Associated QbChart property:
       
                 XLABEL_ROWSIZE
       
       
      Returns:
      The number of the rows used to draw the labels.
    • setLabelRowCount

      void setLabelRowCount(int numRows)
      This function is used to set the number of rows used to display x-axis labels. It is useful to specify multiple rows when drawing long labels so that they don't overlap. Associated QbChart property:
       
                 XLABEL_ROWSIZE
       
       
      Parameters:
      numRows - The number of rows used to draw the labels.
    • isLabelOutsidePlotArea

      boolean isLabelOutsidePlotArea()
      This function is used to check if the tickers and labels are drawn outside chart plot area. It only works for X axis and Y axis of 2D chart. The axis being checked depends on the axis handle being used.
      Returns:
      True if axis tickers and labels are on the side, false otherwise.
    • setLabelOutsidePlotArea

      void setLabelOutsidePlotArea(boolean b)
      This function is used to draw tickers and labels inside/outside chart plot area for the given axis.
      Parameters:
      b - set to true to set tickers and labels on the side, false otherwise
      See Also:
    • getOriginalTickerLabels

      Object[] getOriginalTickerLabels(boolean formatedLabel)
      This function is used to get the original ticker labels or formatted ticker labels. Formatted ticker labels are always converted to String format; non-formatted ticker labels would remain in original data type.
      Parameters:
      formatedData - set to true to get formatted ticker labels, false otherwise
      Returns:
      original ticker labels.
    • getTickerLabelsCount

      int getTickerLabelsCount()
      This function is used to get the ticker labels count.
      Returns:
      number of ticker labels.
    • setTickerLabels

      void setTickerLabels(String[] labels)
      This function is used to set the ticker labels for the given axis. Labels will not change if the new label equals null or empty String.
      Parameters:
      labels - replace original ticker labels with new labels
    • areTickersVisible

      boolean areTickersVisible()
      This function is used to check if the tickers are drawn for the given axis. The axis being checked depends on the axis handle being used. Associated QbChart properties:
       
                 DRAW_XTICKER
                 DRAW_YTICKER
                 DRAW_ZTICKER
       
       
      Returns:
      True if axis tickers are visible, false otherwise.
    • setTickersVisible

      void setTickersVisible(boolean b)
      This function is used to enable/disable axis tickers rendering for the given axis.
      Parameters:
      b - set to true to see tickers, false otherwise
      See Also:
    • areTickersInward

      boolean areTickersInward()
      This function is used to check if the tickers are drawn inward for the given axis. The axis being checked depends on the axis handle being used.
      Returns:
      True if axis tickers are drawn inward, false otherwise.
    • setTickersInward

      void setTickersInward(boolean b)
      This function is used to decide the axis tickers drawing direction.
      Parameters:
      b - set to true to draw tickers inward, false otherwise
      See Also:
    • getTickerColor

      Color getTickerColor()
      This function is used to get the ticker color of the axis(2D) or wall(3D).
    • setTickerColor

      void setTickerColor(Color c)
      This function sets the ticker color of the axis or wall.
      Parameters:
      c - The color to be set.
      See Also:
    • getGridColor

      Color getGridColor()
      This function is used to get the grid color of the axis(2D) or wall(3D). Associated QbChart properties:
       
                 XGRID_COLOR
                 YGRID_COLOR
                 ZGRID_COLOR
       
       
      Returns:
      The Color of the grid
    • setGridColor

      void setGridColor(Color c)
      This function sets the grid color of the axis or wall.
      Parameters:
      c - The color to be set.
      See Also:
    • getGridLineStyle

      int getGridLineStyle()
      This function returns the line style value of the X/Y grid lines. Associated QbChart properties:
       
                 XGRIDLINE_THICKNESS
                 YGRIDLINE_THICKNESS
       
       
      Returns:
      The line style of the grid lines
    • setGridLineStyle

      void setGridLineStyle(int t)
      This function sets the line style of the x/y grid lines.
      Parameters:
      t - The line style desired:solid, dotted, dashed.
      See Also:
    • getGridThickness

      int getGridThickness()
      This function returns the thickness value of the X/Y grid lines. Associated QbChart properties:
       
                 XGRIDLINE_THICKNESS
                 YGRIDLINE_THICKNESS
       
       
      Returns:
      The thickness of the grid lines
    • setGridThickness

      void setGridThickness(int t)
      This function sets the thickness of the x/y grid lines.
      Parameters:
      t - The thickness desired.
      See Also:
    • isGridVisible

      boolean isGridVisible()
      This function returns the drawing status of the axis/wall grid. Associated QbChart properties:
       
                 DRAW_XGRID
                 DRAW_YGRID
                 DRAW_ZGRID
       
       
      Returns:
      True if the grid is visible, false otherwise
    • setGridVisible

      void setGridVisible(boolean b)
      This function enables/disables the drawing of grid lines for the axis associated with this object.
      Parameters:
      b - Set to true if grid lines are desired, false otherwise.
      See Also:
    • getGridHeightRatio

      double getGridHeightRatio()
      This function returns grid height ratio for 2D chart. (From 0.0 to 1.0) Default Value is 1.0
      Returns:
      grid height ratio
    • setGridHeightRatio

      void setGridHeightRatio(double ratio)
      This function sets the grid height ratio for 2D chart. (From 0.0 to 1.0) Default Value is 1.0
      Parameters:
      ratio - grid height ratio.
      See Also:
    • isSkipGridOffset

      boolean isSkipGridOffset()
      This function returns the status of skipping gridline offset.
      Returns:
      True if skipping gridline offset, false otherwise
    • setSkipGridOffset

      void setSkipGridOffset(boolean b)
      This function enables/disables grid line offset for the axis associated with this object.
      Parameters:
      b - Set to true if grid line offset is desired, false otherwise.
    • isGridAlignedWithTicker

      boolean isGridAlignedWithTicker()
      This function is used to check if grid lines are aligned with tickers. Only column, bar, stack column, stack bar, 100% column, hilow, hlco, overlay and box charts support this feature.
      Returns:
      True if the grid lines are aligned with tickers, false otherwise
    • setGridAlignedWithTicker

      void setGridAlignedWithTicker(boolean b)
      This function enables/disables the alignment between grid lines and tickers. Only column, bar, stack column, stack bar, 100% column, hilow, hlco, overlay and box charts support this feature.
      Parameters:
      b - Set to true if grid lines are aligned with tickers, false otherwise.
      See Also:
    • isGridInFront

      boolean isGridInFront()
      This function is used to check if grid lines are in front of the chart. This feature only works with 2D charts
      Returns:
      True if the grid lines are in front of the chart, false otherwise
    • setGridInFront

      void setGridInFront(boolean b)
      Bring the grid to the front. Place the grid lines at the top of the chart. This feature only works with 2D charts
      Parameters:
      b - Set to true if grid lines are in front of the chart, false otherwise.
      See Also:
    • getMinScale

      Number getMinScale()
      Returns the minimum scale value that was defined for this axis.

      Associated QbChart property: AXIS_SCALE

      Returns:
      An object of type Number containing the minimum scale value.
    • setMinScale

      void setMinScale(Number minScale)
      Sets the minimum scale value for this axis.
      Parameters:
      minScale - The minimum scale value to use.
    • getMaxScale

      Number getMaxScale()
      Returns the maximum scale value that was defined for this axis.

      Associated QbChart property: AXIS_SCALE

      Returns:
      An object of type Number containing the maximum scale value.
    • setMaxScale

      void setMaxScale(Number maxScale)
      Sets the maximum scale value for this axis.
      Parameters:
      maxScale - The maximum scale value to use.
    • getScaleStep

      Number getScaleStep()
      Retruns the scale step size(interval) for this axis.

      Associated QbChart property: AXIS_SCALE

      Returns:
      An object of type Number containing the scale step size
    • setScaleStep

      void setScaleStep(Number scaleStep)
      Sets the scale step size(interval) for this axis.
      Parameters:
      scaleStep - The step size to use for the scale.
    • getOffset

      Number getOffset()
      Returns the offset of the x-axis origin from the 0th position.
      Returns:
      An object of type Number containing the offset value.
    • setOffset

      void setOffset(Number num)
      Sets the offset of the x-axis from the origin.

      Associated QbChart property: X_ORIGIN

      Parameters:
      num - The offset value.
    • isDisplayLabelAsDate

      boolean isDisplayLabelAsDate()
      Checks if numeric inputs for this axis is being displayed in the DateTime format.
      Returns:
      True if the labels are displayed as date, false otherwise
    • setDisplayLabelAsDate

      void setDisplayLabelAsDate(boolean b)
      Sets numeric inputs for this axis to be displayed in the DateTime format.
      Parameters:
      b - Set to true if date labels are desired, false otherwise.
    • setScaleStep

      void setScaleStep(int yr, int mo, int dd, int hr, int min)
      Sets the scalestep value for this axis.  Used when the scale step uses a date/time/timestamp instead of a number.
      Parameters:
      yr - The scalestep in year
      mo - The scalestep in month
      dd - The scalestep in day
      hr - The scalestep in hour
      min - The scalestep in minute
    • isDateTimeDisplay

      boolean isDateTimeDisplay()
      Returns if the value axis label are displayed in DateTimeFormat, as opposed to NumericFormat.
    • setDateTimeDisplay

      void setDateTimeDisplay(boolean state)
      Specifies if the value axis labels are displayed in the DateTimeFormat
      Parameters:
      state - the new state, default is true.
    • isDisplayByWeek

      boolean isDisplayByWeek()
      Returns the state of the x-axis label display in day of the week fashion.
    • setDisplayByWeek

      void setDisplayByWeek(boolean state)
      Sets the state of the x-axis label display in day of the week fashion. Known issues: works for dates as early as from the year 1971. Day of week accuracy is compromised by inaccuracy in the java.util.Date class.
      Parameters:
      state - the new state.
    • getTickerStep

      int getTickerStep()
      This function is used to retrieve the ticker step size for the given axis. Ticker step sizes are associated with individual axis.
      Returns:
      The ticker step size.
      See Also:
    • setTickerStep

      void setTickerStep(int stepSize)
      This function is used to set the ticker step size for a particular axis. A step size is the frequency of ticker displayed for an axis. e.g. A step size of 2 means draw a ticker for every 2nd point on the axis. For label filtered date-time chart, a step size of 2 means draw one ticker between labels. (2 equally gap between labels) Ticker step sizes are associated with individual axis.
      Parameters:
      size - The step size.
      See Also:
    • getLabelFormat

      IFormat getLabelFormat()
      This function is used to get the label format for the given axis.
      Returns:
      An object of type IFormat, which contains the label format.
      See Also:
    • setLabelFormat

      void setLabelFormat(IFormat format)
      This function sets the label format for the given axis.
      Parameters:
      format - The object of type IFormat containing the label format.
      See Also:
    • getLabelUnit

      int getLabelUnit()
      This function is used to obtain the unit information of the label Label unit is associated with the individual column not the axis. Use setLabelStep(.....) to set the label unit. No API for setlabelUnit is implemented such that the unit can be consistent with the input data type of the column
      Returns:
      an integer that represents the unit. -1 (IDataPointSet.TICKER) means it has no unit or the column is not of Date type.
      See Also:
    • getLabelStep

      int getLabelStep()
      This function returns the step size for the label display. Label step sizes are associated with individual axis.
      Returns:
      The label step size for that axis.
    • setLabelStep

      void setLabelStep(int size)
      This function sets the label step size for the given axis. This number indicates how frequently the labels are drawn along the axis. Label step sizes are associated with individual axis.
      Parameters:
      size - The label step size desired.
      See Also:
    • getMaxLabelAndTickerCount

      int getMaxLabelAndTickerCount()
      This function returns the max number of the label and ticker display. Max number of the label and ticker is associated with individual axis. This feature is disabled if the return value is less than 1
      Returns:
      The max count for number of the label and ticker.
    • setMaxLabelAndTickerCount

      void setMaxLabelAndTickerCount(int ct)
      This function sets the max number of display label and ticker for the given axis. This number indicates the max number of the labels are drawn along the axis. The max count of label and ticker is associated with individual axis. Set the value to -1 in order to disable this feature
      Parameters:
      ct - The max count for number of the label and ticker desired.
      See Also: