ErrorBar class

ErrorBar class

Represents error bar of data series.

Inheritance: ErrorBarLine

The ErrorBar type exposes the following members:

Properties

PropertyDescription
compound_typeSpecifies the compound line type
dash_typeSpecifies the dash line type
cap_typeSpecifies the ending caps.
join_typeSpecifies the joining caps.
begin_typeSpecifies an arrowhead for the begin of a line.
end_typeSpecifies an arrowhead for the end of a line.
begin_arrow_lengthSpecifies the length of the arrowhead for the begin of a line.
end_arrow_lengthSpecifies the length of the arrowhead for the end of a line.
begin_arrow_widthSpecifies the width of the arrowhead for the begin of a line.
end_arrow_widthSpecifies the width of the arrowhead for the end of a line.
theme_colorGets and sets the theme color.
colorRepresents the Color of the line.
transparencyReturns or sets the degree of transparency of the line as a value from 0.0 (opaque) through 1.0 (clear).
styleRepresents the style of the line.
weightGets or sets the WeightType of the line.
weight_ptGets or sets the weight of the line in unit of points.
weight_pxGets or sets the weight of the line in unit of pixels.
formatting_typeGets or sets format type.
is_automatic_colorIndicates whether the color of line is automatic assigned.
is_visibleRepresents whether the line is visible.
is_autoIndicates whether this line style is auto assigned.
gradient_fillRepresents gradient fill.
typeRepresents error bar amount type.
display_typeRepresents error bar display type.
amountRepresents amount of error bar.
The amount must be greater than or equal to zero.
show_marker_t_topIndicates if formatting error bars with a T-top.
plus_valueRepresents positive error amount when error bar type is Custom.
minus_valueRepresents negative error amount when error bar type is Custom.

Example

from aspose.cells import Workbook
from aspose.cells.charts import ChartType, ErrorBarDisplayType, ErrorBarType

workbook = Workbook()
cells = workbook.worksheets[0].cells
cells.get("a1").put_value(2)
cells.get("a2").put_value(5)
cells.get("a3").put_value(3)
cells.get("a4").put_value(6)
cells.get("b1").put_value(4)
cells.get("b2").put_value(3)
cells.get("b3").put_value(6)
cells.get("b4").put_value(7)
cells.get("C1").put_value("Q1")
cells.get("C2").put_value("Q2")
cells.get("C3").put_value("Y1")
cells.get("C4").put_value("Y2")
chartIndex = workbook.worksheets[0].charts.add(ChartType.COLUMN, 11, 0, 27, 10)
chart = workbook.worksheets[0].charts[chartIndex]
chart.n_series.add("A1:B4", True)
chart.n_series.category_data = "C1:C4"
for i in range(len(chart.n_series)):
    aseries = chart.n_series[i]
    aseries.y_error_bar.display_type = ErrorBarDisplayType.MINUS
    aseries.y_error_bar.type = ErrorBarType.FIXED_VALUE
    aseries.y_error_bar.amount = 5.0

See Also