[]
        
(Showing Draft Content)

ErrorBarDirection

Enum Class ErrorBarDirection

java.lang.Object
java.lang.Enum<ErrorBarDirection>
com.grapecity.documents.excel.drawing.ErrorBarDirection
All Implemented Interfaces:
Serializable, Comparable<ErrorBarDirection>, Constable

public enum ErrorBarDirection extends Enum<ErrorBarDirection>
Specifies the direction of error bars on a chart series.

Error bars indicate the degree of uncertainty in chart data. Only series in area, bar, column, line, and scatter chart groups on 2D charts can have error bars. Only scatter chart series can have both X and Y error bars. Use IErrorBar.getDirection() to retrieve the direction of an error bar.


 IShape shape = worksheet.getShapes().addChart(ChartType.XYScatter, 250, 20, 360, 230);
 worksheet.getRange("A1:B4").setValue(new Object[][] {
     {55, 964}, {20, 825}, {77, 840}
 });
 shape.getChart().getSeriesCollection().add(worksheet.getRange("A1:B4"), RowCol.Columns);
 ISeries series = shape.getChart().getSeriesCollection().get(0);
 series.setHasErrorBars(true);
 ErrorBarDirection direction = series.getYErrorBar().getDirection();
 
  • Enum Constant Details

    • X

      public static final ErrorBarDirection X
      Bars run parallel to the Y axis for X-axis values.
    • Y

      public static final ErrorBarDirection Y
      Bars run parallel to the X axis for Y-axis values.
  • Method Details

    • values

      public static ErrorBarDirection[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ErrorBarDirection valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null