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
Method | Description |
---|---|
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:
Parameter | Type | Description |
---|---|---|
arg0 | java.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.
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:
Parameter | Type | Description |
---|---|---|
value | double |
setAuto(boolean value)
public void setAuto(boolean value)
Indicates whether this line style is auto assigned.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setBeginArrowLength(int value)
public void setBeginArrowLength(int value)
Specifies the length of the arrowhead for the begin of a line.
See MsoArrowheadLength.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setBeginArrowWidth(int value)
public void setBeginArrowWidth(int value)
Specifies the width of the arrowhead for the begin of a line.
See MsoArrowheadWidth.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setBeginType(int value)
public void setBeginType(int value)
Specifies an arrowhead for the begin of a line.
See MsoArrowheadStyle.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setCapType(int value)
public void setCapType(int value)
Specifies the ending caps.
See LineCapType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setColor(Color value)
public void setColor(Color value)
Represents the Color of the line.
Parameters:
Parameter | Type | Description |
---|---|---|
value | Color |
setCompoundType(int value)
public void setCompoundType(int value)
Specifies the compound line type
See MsoLineStyle.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setDashType(int value)
public void setDashType(int value)
Specifies the dash line type
See MsoLineDashStyle.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setDisplayType(int value)
public void setDisplayType(int value)
Represents the display type of error bar.
See ErrorBarDisplayType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setEndArrowLength(int value)
public void setEndArrowLength(int value)
Specifies the length of the arrowhead for the end of a line.
See MsoArrowheadLength.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setEndArrowWidth(int value)
public void setEndArrowWidth(int value)
Specifies the width of the arrowhead for the end of a line.
See MsoArrowheadWidth.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setEndType(int value)
public void setEndType(int value)
Specifies an arrowhead for the end of a line.
See MsoArrowheadStyle.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setFormattingType(int value)
public void setFormattingType(int value)
Sets format type.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setJoinType(int value)
public void setJoinType(int value)
Specifies the joining caps.
See LineJoinType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setMinusValue(String value)
public void setMinusValue(String value)
Represents negative error amount when error bar type is Custom.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setPlusValue(String value)
public void setPlusValue(String value)
Represents positive error amount when error bar type is Custom.
Parameters:
Parameter | Type | Description |
---|---|---|
value | java.lang.String |
setShowMarkerTTop(boolean value)
public void setShowMarkerTTop(boolean value)
Indicates if formatting error bars with a T-top.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setStyle(int value)
public void setStyle(int value)
Represents the style of the line.
See LineType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
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:
Parameter | Type | Description |
---|---|---|
value | ThemeColor |
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:
Parameter | Type | Description |
---|---|---|
value | double |
setType(int value)
public void setType(int value)
Represents error bar amount type.
See ErrorBarType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setVisible(boolean value)
public void setVisible(boolean value)
Represents whether the line is visible.
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean |
setWeight(int value)
public void setWeight(int value)
Sets the WeightType of the line.
See WeightType.
Parameters:
Parameter | Type | Description |
---|---|---|
value | int |
setWeightPt(double value)
public void setWeightPt(double value)
Sets the weight of the line in unit of points.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double |
setWeightPx(double value)
public void setWeightPx(double value)
Sets the weight of the line in unit of pixels.
Parameters:
Parameter | Type | Description |
---|---|---|
value | double |
toString()
public String toString()
Returns: java.lang.String
wait()
public final void wait()
wait(long arg0)
public final native void wait(long arg0)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long |
wait(long arg0, int arg1)
public final void wait(long arg0, int arg1)
Parameters:
Parameter | Type | Description |
---|---|---|
arg0 | long | |
arg1 | int |