asposecells.api

Class ErrorBar

Represents error bar of data series.

Example:

workbook = Workbook()
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")
    
chartIndex = workbook.getWorksheets().get(0).getCharts().add(ChartType.COLUMN, 11, 0, 27, 10)
    
chart = workbook.getWorksheets().get(0).getCharts().get(chartIndex)
chart.getNSeries().add("A1:B4", True)
    
chart.getNSeries().setCategoryData("C1:C4")

for i in range(0, chart.getNSeries().getCount()):
    aseries = chart.getNSeries().get(i)
    aseries.getXErrorBar().setDisplayType(ErrorBarDisplayType.MINUS)
    aseries.getXErrorBar().setType(ErrorBarType.FIXED_VALUE)
    aseries.getXErrorBar().setAmount(5)

Property Getters/Setters Summary
methodgetAmount()
method
setAmount(value)
           Represents amount of error bar.
methodgetBeginArrowLength()
method
           Specifies the length of the arrowhead for the begin of a line. The value of the property is MsoArrowheadLength integer constant.
methodgetBeginArrowWidth()
method
           Specifies the width of the arrowhead for the begin of a line. The value of the property is MsoArrowheadWidth integer constant.
methodgetBeginType()
method
           Specifies an arrowhead for the begin of a line. The value of the property is MsoArrowheadStyle integer constant.
methodgetCapType()
method
setCapType(value)
           Specifies the ending caps. The value of the property is LineCapType integer constant.
methodgetColor()
method
setColor(value)
           Represents the com.aspose.cells.Color of the line.
methodgetCompoundType()
method
           Specifies the compound line type The value of the property is MsoLineStyle integer constant.
methodgetDashType()
method
           Specifies the dash line type The value of the property is MsoLineDashStyle integer constant.
methodgetDisplayType()
method
           Represents the display type of error bar. The value of the property is ErrorBarDisplayType integer constant.
methodgetEndArrowLength()
method
           Specifies the length of the arrowhead for the end of a line. The value of the property is MsoArrowheadLength integer constant.
methodgetEndArrowWidth()
method
           Specifies the width of the arrowhead for the end of a line. The value of the property is MsoArrowheadWidth integer constant.
methodgetEndType()
method
setEndType(value)
           Specifies an arrowhead for the end of a line. The value of the property is MsoArrowheadStyle integer constant.
methodgetFormattingType()
method
           Gets or sets format type. The value of the property is ChartLineFormattingType integer constant.
methodgetGradientFill()
Represents gradient fill.
methodisAuto()
method
setAuto(value)
           Indicates whether this line style is auto assigned.
methodisAutomaticColor()
Indicates whether the color of line is automatic assigned.
methodisVisible()
method
setVisible(value)
           Represents whether the line is visible.
methodgetJoinType()
method
           Specifies the joining caps. The value of the property is LineJoinType integer constant.
methodgetMinusValue()
method
           Represents negative error amount when error bar type is Custom.
methodgetPlusValue()
method
           Represents positive error amount when error bar type is Custom.
methodgetShowMarkerTTop()
method
           Indicates if formatting error bars with a T-top.
methodgetStyle()
method
setStyle(value)
           Represents the style of the line. The value of the property is LineType integer constant.
methodgetThemeColor()
method
           Gets and sets the theme color.
methodgetTransparency()
method
           Returns or sets the degree of transparency of the line as a value from 0.0 (opaque) through 1.0 (clear).
methodgetType()
method
setType(value)
           Represents error bar amount type. The value of the property is ErrorBarType integer constant.
methodgetWeight()
method
setWeight(value)
           Gets or sets the WeightType of the line. The value of the property is WeightType integer constant.
methodgetWeightPt()
method
           Gets or sets the weight of the line in unit of points.
methodgetWeightPx()
method
           Gets or sets the weight of the line in unit of pixels.
 

    • Property Getters/Setters Detail

      • getType/setType : int 

        int getType() / setType(value)
        
        Represents error bar amount type. The value of the property is ErrorBarType integer constant.

        Example:

        workbook = Workbook()
        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")
            
        chartIndex = workbook.getWorksheets().get(0).getCharts().add(ChartType.COLUMN, 11, 0, 27, 10)
        chart = workbook.getWorksheets().get(0).getCharts().get(chartIndex)
        chart.getNSeries().add("A1:B4", True)
            
        chart.getNSeries().setCategoryData("C1:C4")
        
        for i in range (0, chart.getNSeries().getCount()):
            aseries = chart.getNSeries().get(i)
            # Sets custom error bar type
            aseries.getXErrorBar().setType(ErrorBarType.CUSTOM)
            aseries.getXErrorBar().setPlusValue("=Sheet1!A1")
            aseries.getXErrorBar().setMinusValue("=Sheet1!A2")
      • getDisplayType/setDisplayType : int 

        int getDisplayType() / setDisplayType(value)
        
        Represents the display type of error bar. The value of the property is ErrorBarDisplayType integer constant.
      • getAmount/setAmount : float 

        float getAmount() / setAmount(value)
        
        Represents amount of error bar. The amount must be greater than or equal to zero.
      • getShowMarkerTTop/setShowMarkerTTop : boolean 

        boolean getShowMarkerTTop() / setShowMarkerTTop(value)
        
        Indicates if formatting error bars with a T-top.
      • getPlusValue/setPlusValue : String 

        String getPlusValue() / setPlusValue(value)
        
        Represents positive error amount when error bar type is Custom.
      • getMinusValue/setMinusValue : String 

        String getMinusValue() / setMinusValue(value)
        
        Represents negative error amount when error bar type is Custom.
      • getCompoundType/setCompoundType : int 

        int getCompoundType() / setCompoundType(value)
        
        Specifies the compound line type The value of the property is MsoLineStyle integer constant.
      • getDashType/setDashType : int 

        int getDashType() / setDashType(value)
        
        Specifies the dash line type The value of the property is MsoLineDashStyle integer constant.
      • getCapType/setCapType : int 

        int getCapType() / setCapType(value)
        
        Specifies the ending caps. The value of the property is LineCapType integer constant.
      • getJoinType/setJoinType : int 

        int getJoinType() / setJoinType(value)
        
        Specifies the joining caps. The value of the property is LineJoinType integer constant.
      • getBeginType/setBeginType : int 

        int getBeginType() / setBeginType(value)
        
        Specifies an arrowhead for the begin of a line. The value of the property is MsoArrowheadStyle integer constant.
      • getEndType/setEndType : int 

        int getEndType() / setEndType(value)
        
        Specifies an arrowhead for the end of a line. The value of the property is MsoArrowheadStyle integer constant.
      • getBeginArrowLength/setBeginArrowLength : int 

        int getBeginArrowLength() / setBeginArrowLength(value)
        
        Specifies the length of the arrowhead for the begin of a line. The value of the property is MsoArrowheadLength integer constant.
      • getEndArrowLength/setEndArrowLength : int 

        int getEndArrowLength() / setEndArrowLength(value)
        
        Specifies the length of the arrowhead for the end of a line. The value of the property is MsoArrowheadLength integer constant.
      • getBeginArrowWidth/setBeginArrowWidth : int 

        int getBeginArrowWidth() / setBeginArrowWidth(value)
        
        Specifies the width of the arrowhead for the begin of a line. The value of the property is MsoArrowheadWidth integer constant.
      • getEndArrowWidth/setEndArrowWidth : int 

        int getEndArrowWidth() / setEndArrowWidth(value)
        
        Specifies the width of the arrowhead for the end of a line. The value of the property is MsoArrowheadWidth integer constant.
      • getThemeColor/setThemeColor : ThemeColor 

        ThemeColor getThemeColor() / setThemeColor(value)
        
        Gets and sets the theme color. If the foreground color is not a theme color, NULL will be returned.
      • getColor/setColor : Color 

        Color getColor() / setColor(value)
        
        Represents the com.aspose.cells.Color of the line.
      • getTransparency/setTransparency : float 

        float getTransparency() / setTransparency(value)
        
        Returns or sets the degree of transparency of the line as a value from 0.0 (opaque) through 1.0 (clear).
      • getStyle/setStyle : int 

        int getStyle() / setStyle(value)
        
        Represents the style of the line. The value of the property is LineType integer constant.
      • getWeight/setWeight : int 

        int getWeight() / setWeight(value)
        
        Gets or sets the WeightType of the line. The value of the property is WeightType integer constant.
      • getWeightPt/setWeightPt : float 

        float getWeightPt() / setWeightPt(value)
        
        Gets or sets the weight of the line in unit of points.
      • getWeightPx/setWeightPx : float 

        float getWeightPx() / setWeightPx(value)
        
        Gets or sets the weight of the line in unit of pixels.
      • getFormattingType/setFormattingType : int 

        int getFormattingType() / setFormattingType(value)
        
        Gets or sets format type. The value of the property is ChartLineFormattingType integer constant.
      • isAutomaticColor : boolean 

        boolean isAutomaticColor()
        
        Indicates whether the color of line is automatic assigned.
      • isVisible/setVisible : boolean 

        boolean isVisible() / setVisible(value)
        
        Represents whether the line is visible.
      • isAuto/setAuto : boolean 

        boolean isAuto() / setAuto(value)
        
        Indicates whether this line style is auto assigned.