ErrorBar

Inheritance: java.lang.Object, com.aspose.cells.Line

public class ErrorBar extends Line

Represents error bar of data series.

Example

         Workbook workbook = new Workbook();
         Cells cells = workbook.getWorksheets().get(0).getCells();
         cells.get("a1").putValue(2);
         cells.get("a2").putValue(5);
         cells.get("a3").putValue(3);
         cells.get("a4").putValue(6);
         cells.get("b1").putValue(4);
         cells.get("b2").putValue(3);
         cells.get("b3").putValue(6);
         cells.get("b4").putValue(7);
 
         cells.get("C1").putValue("Q1");
         cells.get("C2").putValue("Q2");
         cells.get("C3").putValue("Y1");
         cells.get("C4").putValue("Y2");
 
         int chartIndex = workbook.getWorksheets().get(0).getCharts().add(ChartType.COLUMN, 11, 0, 27, 10);
 
         Chart chart = workbook.getWorksheets().get(0).getCharts().get(chartIndex);
         chart.getNSeries().add("A1:B4", true);
 
         chart.getNSeries().setCategoryData("C1:C4");
 
         for(int i = 0; i <chart.getNSeries().getCount(); i ++)
         {
         		Series aseries = chart.getNSeries().get(i);
         		aseries.getYErrorBar().setDisplayType(ErrorBarDisplayType.MINUS);
         		aseries.getYErrorBar().setType(ErrorBarType.FIXED_VALUE);
         		aseries.getYErrorBar().setAmount(5);
         }

Methods

MethodDescription
equals(Object arg0)
getAmount()Represents amount of error bar.
getBeginArrowLength()Specifies the length of the arrowhead for the begin of a line.
getBeginArrowWidth()Specifies the width of the arrowhead for the begin of a line.
getBeginType()Specifies an arrowhead for the begin of a line.
getCapType()Specifies the ending caps.
getClass()
getColor()Represents the Color of the line.
getCompoundType()Specifies the compound line type
getDashType()Specifies the dash line type
getDisplayType()Represents the display type of error bar.
getEndArrowLength()Specifies the length of the arrowhead for the end of a line.
getEndArrowWidth()Specifies the width of the arrowhead for the end of a line.
getEndType()Specifies an arrowhead for the end of a line.
getFormattingType()Gets format type.
getGradientFill()Represents gradient fill.
getJoinType()Specifies the joining caps.
getMinusValue()Represents negative error amount when error bar type is Custom.
getPlusValue()Represents positive error amount when error bar type is Custom.
getShowMarkerTTop()Indicates if formatting error bars with a T-top.
getStyle()Represents the style of the line.
getThemeColor()Gets the theme color.
getTransparency()Returns or sets the degree of transparency of the line as a value from 0.0 (opaque) through 1.0 (clear).
getType()Represents error bar amount type.
getWeight()Gets the WeightType of the line.
getWeightPt()Gets the weight of the line in unit of points.
getWeightPx()Gets the weight of the line in unit of pixels.
hashCode()
isAuto()Indicates whether this line style is auto assigned.
isAutomaticColor()Indicates whether the color of line is automatic assigned.
isVisible()Represents whether the line is visible.
notify()
notifyAll()
setAmount(double value)Represents amount of error bar.
setAuto(boolean value)Indicates whether this line style is auto assigned.
setBeginArrowLength(int value)Specifies the length of the arrowhead for the begin of a line.
setBeginArrowWidth(int value)Specifies the width of the arrowhead for the begin of a line.
setBeginType(int value)Specifies an arrowhead for the begin of a line.
setCapType(int value)Specifies the ending caps.
setColor(Color value)Represents the Color of the line.
setCompoundType(int value)Specifies the compound line type
setDashType(int value)Specifies the dash line type
setDisplayType(int value)Represents the display type of error bar.
setEndArrowLength(int value)Specifies the length of the arrowhead for the end of a line.
setEndArrowWidth(int value)Specifies the width of the arrowhead for the end of a line.
setEndType(int value)Specifies an arrowhead for the end of a line.
setFormattingType(int value)Sets format type.
setJoinType(int value)Specifies the joining caps.
setMinusValue(String value)Represents negative error amount when error bar type is Custom.
setPlusValue(String value)Represents positive error amount when error bar type is Custom.
setShowMarkerTTop(boolean value)Indicates if formatting error bars with a T-top.
setStyle(int value)Represents the style of the line.
setThemeColor(ThemeColor value)Sets the theme color.
setTransparency(double value)Returns or sets the degree of transparency of the line as a value from 0.0 (opaque) through 1.0 (clear).
setType(int value)Represents error bar amount type.
setVisible(boolean value)Represents whether the line is visible.
setWeight(int value)Sets the WeightType of the line.
setWeightPt(double value)Sets the weight of the line in unit of points.
setWeightPx(double value)Sets the weight of the line in unit of pixels.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getAmount()

public double getAmount()

Represents amount of error bar.

Remarks

The amount must be greater than or equal to zero.

Returns: double

getBeginArrowLength()

public int getBeginArrowLength()

Specifies the length of the arrowhead for the begin of a line.

See MsoArrowheadLength.

Returns: int

getBeginArrowWidth()

public int getBeginArrowWidth()

Specifies the width of the arrowhead for the begin of a line.

See MsoArrowheadWidth.

Returns: int

getBeginType()

public int getBeginType()

Specifies an arrowhead for the begin of a line.

See MsoArrowheadStyle.

Returns: int

getCapType()

public int getCapType()

Specifies the ending caps.

See LineCapType.

Returns: int

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getColor()

public Color getColor()

Represents the Color of the line.

Returns: Color

getCompoundType()

public int getCompoundType()

Specifies the compound line type

See MsoLineStyle.

Returns: int

getDashType()

public int getDashType()

Specifies the dash line type

See MsoLineDashStyle.

Returns: int

getDisplayType()

public int getDisplayType()

Represents the display type of error bar.

See ErrorBarDisplayType.

Returns: int

getEndArrowLength()

public int getEndArrowLength()

Specifies the length of the arrowhead for the end of a line.

See MsoArrowheadLength.

Returns: int

getEndArrowWidth()

public int getEndArrowWidth()

Specifies the width of the arrowhead for the end of a line.

See MsoArrowheadWidth.

Returns: int

getEndType()

public int getEndType()

Specifies an arrowhead for the end of a line.

See MsoArrowheadStyle.

Returns: int

getFormattingType()

public int getFormattingType()

Gets format type.

See ChartLineFormattingType.

Returns: int

getGradientFill()

public GradientFill getGradientFill()

Represents gradient fill.

Returns: GradientFill

getJoinType()

public int getJoinType()

Specifies the joining caps.

See LineJoinType.

Returns: int

getMinusValue()

public String getMinusValue()

Represents negative error amount when error bar type is Custom.

Returns: java.lang.String

getPlusValue()

public String getPlusValue()

Represents positive error amount when error bar type is Custom.

Returns: java.lang.String

getShowMarkerTTop()

public boolean getShowMarkerTTop()

Indicates if formatting error bars with a T-top.

Returns: boolean

getStyle()

public int getStyle()

Represents the style of the line.

See LineType.

Returns: int

getThemeColor()

public ThemeColor getThemeColor()

Gets the theme color.

Remarks

If the foreground color is not a theme color, NULL will be returned.

Returns: ThemeColor

getTransparency()

public double getTransparency()

Returns or sets the degree of transparency of the line as a value from 0.0 (opaque) through 1.0 (clear).

Returns: double

getType()

public int getType()

Represents error bar amount type.

See ErrorBarType.

Example

         Workbook wb = new Workbook("chart.xlsx");
         Chart chart = wb.getWorksheets().get(0).getCharts().get(0);
         Series aseries = chart.getNSeries().get(0);
         //Sets custom error bar type
         aseries.getYErrorBar().setType(ErrorBarType.CUSTOM);
         aseries.getYErrorBar().setPlusValue("=Sheet1!A1");
         aseries.getYErrorBar().setMinusValue("=Sheet1!A2");

Returns: int

getWeight()

public int getWeight()

Gets the WeightType of the line.

See WeightType.

Returns: int

getWeightPt()

public double getWeightPt()

Gets the weight of the line in unit of points.

Returns: double

getWeightPx()

public double getWeightPx()

Gets the weight of the line in unit of pixels.

Returns: double

hashCode()

public native int hashCode()

Returns: int

isAuto()

public boolean isAuto()

Indicates whether this line style is auto assigned.

Returns: boolean

isAutomaticColor()

public boolean isAutomaticColor()

Indicates whether the color of line is automatic assigned.

Returns: boolean

isVisible()

public boolean isVisible()

Represents whether the line is visible.

Returns: boolean

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setAmount(double value)

public void setAmount(double value)

Represents amount of error bar.

Remarks

The amount must be greater than or equal to zero.

Parameters:

ParameterTypeDescription
valuedouble

setAuto(boolean value)

public void setAuto(boolean value)

Indicates whether this line style is auto assigned.

Parameters:

ParameterTypeDescription
valueboolean

setBeginArrowLength(int value)

public void setBeginArrowLength(int value)

Specifies the length of the arrowhead for the begin of a line.

See MsoArrowheadLength.

Parameters:

ParameterTypeDescription
valueint

setBeginArrowWidth(int value)

public void setBeginArrowWidth(int value)

Specifies the width of the arrowhead for the begin of a line.

See MsoArrowheadWidth.

Parameters:

ParameterTypeDescription
valueint

setBeginType(int value)

public void setBeginType(int value)

Specifies an arrowhead for the begin of a line.

See MsoArrowheadStyle.

Parameters:

ParameterTypeDescription
valueint

setCapType(int value)

public void setCapType(int value)

Specifies the ending caps.

See LineCapType.

Parameters:

ParameterTypeDescription
valueint

setColor(Color value)

public void setColor(Color value)

Represents the Color of the line.

Parameters:

ParameterTypeDescription
valueColor

setCompoundType(int value)

public void setCompoundType(int value)

Specifies the compound line type

See MsoLineStyle.

Parameters:

ParameterTypeDescription
valueint

setDashType(int value)

public void setDashType(int value)

Specifies the dash line type

See MsoLineDashStyle.

Parameters:

ParameterTypeDescription
valueint

setDisplayType(int value)

public void setDisplayType(int value)

Represents the display type of error bar.

See ErrorBarDisplayType.

Parameters:

ParameterTypeDescription
valueint

setEndArrowLength(int value)

public void setEndArrowLength(int value)

Specifies the length of the arrowhead for the end of a line.

See MsoArrowheadLength.

Parameters:

ParameterTypeDescription
valueint

setEndArrowWidth(int value)

public void setEndArrowWidth(int value)

Specifies the width of the arrowhead for the end of a line.

See MsoArrowheadWidth.

Parameters:

ParameterTypeDescription
valueint

setEndType(int value)

public void setEndType(int value)

Specifies an arrowhead for the end of a line.

See MsoArrowheadStyle.

Parameters:

ParameterTypeDescription
valueint

setFormattingType(int value)

public void setFormattingType(int value)

Sets format type.

See ChartLineFormattingType.

Parameters:

ParameterTypeDescription
valueint

setJoinType(int value)

public void setJoinType(int value)

Specifies the joining caps.

See LineJoinType.

Parameters:

ParameterTypeDescription
valueint

setMinusValue(String value)

public void setMinusValue(String value)

Represents negative error amount when error bar type is Custom.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setPlusValue(String value)

public void setPlusValue(String value)

Represents positive error amount when error bar type is Custom.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setShowMarkerTTop(boolean value)

public void setShowMarkerTTop(boolean value)

Indicates if formatting error bars with a T-top.

Parameters:

ParameterTypeDescription
valueboolean

setStyle(int value)

public void setStyle(int value)

Represents the style of the line.

See LineType.

Parameters:

ParameterTypeDescription
valueint

setThemeColor(ThemeColor value)

public void setThemeColor(ThemeColor value)

Sets the theme color.

Remarks

If the foreground color is not a theme color, NULL will be returned.

Parameters:

ParameterTypeDescription
valueThemeColor

setTransparency(double value)

public void setTransparency(double value)

Returns or sets the degree of transparency of the line as a value from 0.0 (opaque) through 1.0 (clear).

Parameters:

ParameterTypeDescription
valuedouble

setType(int value)

public void setType(int value)

Represents error bar amount type.

See ErrorBarType.

Parameters:

ParameterTypeDescription
valueint

setVisible(boolean value)

public void setVisible(boolean value)

Represents whether the line is visible.

Parameters:

ParameterTypeDescription
valueboolean

setWeight(int value)

public void setWeight(int value)

Sets the WeightType of the line.

See WeightType.

Parameters:

ParameterTypeDescription
valueint

setWeightPt(double value)

public void setWeightPt(double value)

Sets the weight of the line in unit of points.

Parameters:

ParameterTypeDescription
valuedouble

setWeightPx(double value)

public void setWeightPx(double value)

Sets the weight of the line in unit of pixels.

Parameters:

ParameterTypeDescription
valuedouble

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int