[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Drawing.IErrorBar

IErrorBar Interface

Represents the error bars in a chart series.

Error bars indicate the degree of uncertainty for chart data. They can be applied to series in area, bar, column, line, and scatter groups on 2D charts. Only scatter series support both X and Y error bars.

Use this interface to configure the included error-bar parts, value type, end style, amount, custom positive and negative formulas, and chart formatting for a series.

Namespace: GrapeCity.Documents.Excel.Drawing
Assembly: DS.Documents.Excel.dll
Syntax
public interface IErrorBar
Public Interface IErrorBar
Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Quarter", "Sales"},
    {"Q1", 1200},
    {"Q2", 1500},
    {"Q3", 1800}
};
IShape shape = worksheet.Shapes.AddChart(ChartType.ColumnClustered, 20, 20, 360, 220);
shape.Chart.SeriesCollection.Add(worksheet.Range["A1:B4"], RowCol.Columns, true, true);
ISeries series = shape.Chart.SeriesCollection[0];
series.HasErrorBars = true;
IErrorBar errorBar = series.YErrorBar;
errorBar.ValueType = ErrorBarType.FixedValue;
errorBar.Amount = 100;

Properties

Name Description
Amount

Gets or sets the amount used by the error bar.

The meaning of the returned value depends on the current error bar value type. For example, it represents the fixed amount for FixedValue, the percentage value for Percentage, or the number of standard deviations for StDev. For custom error bars, use Plus and Minus.

Direction

Gets the direction of this error bar.

The returned value indicates whether this error bar applies to X values or Y values in the chart series. For scatter series, error bars can exist in both directions.

EndStyle

Gets or sets the end style for the error bar.

The returned value specifies whether the error bar is displayed with caps at its ends.

Format

Gets the IChartFormat object for this error bar.

Use the returned format object to access and modify the appearance of the error bar, error bar, such as line color and line style.

Minus

Gets or sets the formula for the negative error amount when the error bar value type is Custom.

Use this property to retrieve the formula string that defines the negative custom error values for the error bar.

Parent

Gets the parent ISeries that contains this error bar.

Use this property to access the chart series that owns the current error bar.

Plus

Gets or sets the formula for the positive error amount when the error bar value type is Custom.

Use this property to retrieve the formula string that defines the positive custom error values for the error bar.

Type

Gets or sets which parts of the error bar are included.

The returned ErrorBarInclude value specifies whether the error bar shows positive values, negative values, both, or no range.

ValueType

Gets or sets how the error bar range is determined.

The returned ErrorBarType indicates whether the error bar uses a fixed value, percentage, standard deviation, standard error, or custom values.

Methods

Name Description
ClearFormats()

Clears the formatting of this error bar.

Use this method to remove custom formatting that has been applied to the error bar.

Delete()

Deletes this error bar from its chart series.

Use this method to remove an existing X or Y error bar that was obtained from a series.