public class ErrorBar
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);
}
Property Getters/Setters Summary | ||
---|---|---|
double | getAmount() | |
void | setAmount(doublevalue) | |
Represents amount of error bar.
|
||
int | getBeginArrowLength() | |
void | setBeginArrowLength(intvalue) | |
Specifies the length of the arrowhead for the begin of a line. The value of the property is MsoArrowheadLength integer constant. | ||
int | getBeginArrowWidth() | |
void | setBeginArrowWidth(intvalue) | |
Specifies the width of the arrowhead for the begin of a line. The value of the property is MsoArrowheadWidth integer constant. | ||
int | getBeginType() | |
void | setBeginType(intvalue) | |
Specifies an arrowhead for the begin of a line. The value of the property is MsoArrowheadStyle integer constant. | ||
int | getCapType() | |
void | setCapType(intvalue) | |
Specifies the ending caps. The value of the property is LineCapType integer constant. | ||
com.aspose.cells.Color | getColor() | |
void | setColor(com.aspose.cells.Colorvalue) | |
Represents the |
||
int | getCompoundType() | |
void | setCompoundType(intvalue) | |
Specifies the compound line type The value of the property is MsoLineStyle integer constant. | ||
int | getDashType() | |
void | setDashType(intvalue) | |
Specifies the dash line type The value of the property is MsoLineDashStyle integer constant. | ||
int | getDisplayType() | |
void | setDisplayType(intvalue) | |
Represents error bar display type. The value of the property is ErrorBarDisplayType integer constant. | ||
int | getEndArrowLength() | |
void | setEndArrowLength(intvalue) | |
Specifies the length of the arrowhead for the end of a line. The value of the property is MsoArrowheadLength integer constant. | ||
int | getEndArrowWidth() | |
void | setEndArrowWidth(intvalue) | |
Specifies the width of the arrowhead for the end of a line. The value of the property is MsoArrowheadWidth integer constant. | ||
int | getEndType() | |
void | setEndType(intvalue) | |
Specifies an arrowhead for the end of a line. The value of the property is MsoArrowheadStyle integer constant. | ||
int | getFormattingType() | |
void | setFormattingType(intvalue) | |
Gets or sets format type. The value of the property is ChartLineFormattingType integer constant. | ||
GradientFill | getGradientFill() | |
Represents gradient fill.
|
||
boolean | isAuto() | |
void | setAuto(booleanvalue) | |
Indicates whether this line style is auto assigned. | ||
boolean | isAutomaticColor() | |
Indicates whether the color of line is auotmatic assigned.
|
||
boolean | isVisible() | |
void | setVisible(booleanvalue) | |
Represents whether the line is visible. | ||
int | getJoinType() | |
void | setJoinType(intvalue) | |
Specifies the joining caps. The value of the property is LineJoinType integer constant. | ||
java.lang.String | getMinusValue() | |
void | setMinusValue(java.lang.Stringvalue) | |
Represents negative error amount when error bar type is InnerCustom. | ||
java.lang.String | getPlusValue() | |
void | setPlusValue(java.lang.Stringvalue) | |
Represents positive error amount when error bar type is InnerCustom. | ||
boolean | getShowMarkerTTop() | |
void | setShowMarkerTTop(booleanvalue) | |
Indicates if formatting error bars with a T-top. | ||
int | getStyle() | |
void | setStyle(intvalue) | |
Represents the style of the line. The value of the property is LineType integer constant. | ||
ThemeColor | getThemeColor() | |
void | setThemeColor(ThemeColor value) | |
Gets and sets the theme color. | ||
double | getTransparency() | |
void | setTransparency(doublevalue) | |
Returns or sets the degree of transparency of the line as a value from 0.0 (opaque) through 1.0 (clear). | ||
int | getType() | |
void | setType(intvalue) | |
Represents error bar amount type. The value of the property is ErrorBarType integer constant. | ||
int | getWeight() | |
void | setWeight(intvalue) | |
Gets or sets the |
||
double | getWeightPt() | |
void | setWeightPt(doublevalue) | |
Gets or sets the weight of the line in unit of points. | ||
double | getWeightPx() | |
void | setWeightPx(doublevalue) | |
Gets or sets the weight of the line in uni of pixels. |
public int getType() / public void setType(int value)
Example:
//Sets custom error bar type 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.CUSTOM); aseries.getYErrorBar().setPlusValue("=Sheet1!A1"); aseries.getYErrorBar().setMinusValue("=Sheet1!A2"); }
public int getDisplayType() / public void setDisplayType(int value)
public double getAmount() / public void setAmount(double value)
public boolean getShowMarkerTTop() / public void setShowMarkerTTop(boolean value)
public java.lang.String getPlusValue() / public void setPlusValue(java.lang.String value)
public java.lang.String getMinusValue() / public void setMinusValue(java.lang.String value)
public int getCompoundType() / public void setCompoundType(int value)
public int getDashType() / public void setDashType(int value)
public int getCapType() / public void setCapType(int value)
public int getJoinType() / public void setJoinType(int value)
public int getBeginType() / public void setBeginType(int value)
public int getEndType() / public void setEndType(int value)
public int getBeginArrowLength() / public void setBeginArrowLength(int value)
public int getEndArrowLength() / public void setEndArrowLength(int value)
public int getBeginArrowWidth() / public void setBeginArrowWidth(int value)
public int getEndArrowWidth() / public void setEndArrowWidth(int value)
public ThemeColor getThemeColor() / public void setThemeColor(ThemeColor value)
public com.aspose.cells.Color getColor() / public void setColor(com.aspose.cells.Color value)
public double getTransparency() / public void setTransparency(double value)
public int getStyle() / public void setStyle(int value)
public int getWeight() / public void setWeight(int value)
public double getWeightPt() / public void setWeightPt(double value)
public double getWeightPx() / public void setWeightPx(double value)
public int getFormattingType() / public void setFormattingType(int value)
public boolean isAutomaticColor()
public boolean isVisible() / public void setVisible(boolean value)
public boolean isAuto() / public void setAuto(boolean value)
public GradientFill getGradientFill()