ErrorBar
ErrorBar class
Represents error bar of data series.
class ErrorBar extends Line;
Example
const { Workbook, ChartType, ErrorBarDisplayType, ErrorBarType } = require("aspose.cells.node");
var workbook = new Workbook();
var 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");
var chartIndex = workbook.getWorksheets().get(0).getCharts().add(ChartType.Column, 11, 0, 27, 10);
var chart = workbook.getWorksheets().get(0).getCharts().get(chartIndex);
chart.getNSeries().add("A1:B4", true);
chart.getNSeries().setCategoryData("C1:C4");
for (var i = 0; i < chart.getNSeries().getCount(); i++)
{
var aseries = chart.getNSeries().get(i);
aseries.getXErrorBar().setDisplayType(ErrorBarDisplayType.Minus);
aseries.getXErrorBar().setType(ErrorBarType.FixedValue);
aseries.getXErrorBar().setAmount(5);
}
Constructors
Name | Description |
---|---|
constructor(Line) | Constructs from a parent object convertible to this. |
Methods
Method | Description |
---|---|
getType() | Represents error bar amount type. |
setType(ErrorBarType) | Represents error bar amount type. |
getDisplayType() | Represents the display type of error bar. |
setDisplayType(ErrorBarDisplayType) | Represents the display type of error bar. |
getAmount() | Represents amount of error bar. |
setAmount(number) | Represents amount of error bar. |
getShowMarkerTTop() | Indicates if formatting error bars with a T-top. |
setShowMarkerTTop(boolean) | Indicates if formatting error bars with a T-top. |
getPlusValue() | Represents positive error amount when error bar type is Custom. |
setPlusValue(string) | Represents positive error amount when error bar type is Custom. |
getMinusValue() | Represents negative error amount when error bar type is Custom. |
setMinusValue(string) | Represents negative error amount when error bar type is Custom. |
isNull() | Checks whether the implementation object is null. |
getCompoundType() | Specifies the compound line type |
setCompoundType(MsoLineStyle) | Specifies the compound line type |
getDashType() | Specifies the dash line type |
setDashType(MsoLineDashStyle) | Specifies the dash line type |
getCapType() | Specifies the ending caps. |
setCapType(LineCapType) | Specifies the ending caps. |
getJoinType() | Specifies the joining caps. |
setJoinType(LineJoinType) | Specifies the joining caps. |
getBeginType() | Specifies an arrowhead for the begin of a line. |
setBeginType(MsoArrowheadStyle) | Specifies an arrowhead for the begin of a line. |
getEndType() | Specifies an arrowhead for the end of a line. |
setEndType(MsoArrowheadStyle) | Specifies an arrowhead for the end of a line. |
getBeginArrowLength() | Specifies the length of the arrowhead for the begin of a line. |
setBeginArrowLength(MsoArrowheadLength) | Specifies the length of the arrowhead for the begin of a line. |
getEndArrowLength() | Specifies the length of the arrowhead for the end of a line. |
setEndArrowLength(MsoArrowheadLength) | Specifies the length of the arrowhead for the end of a line. |
getBeginArrowWidth() | Specifies the width of the arrowhead for the begin of a line. |
setBeginArrowWidth(MsoArrowheadWidth) | Specifies the width of the arrowhead for the begin of a line. |
getEndArrowWidth() | Specifies the width of the arrowhead for the end of a line. |
setEndArrowWidth(MsoArrowheadWidth) | Specifies the width of the arrowhead for the end of a line. |
getThemeColor() | Gets and sets the theme color. |
setThemeColor(ThemeColor) | Gets and sets the theme color. |
getColor() | Represents the Color of the line. |
setColor(Color) | Represents the Color of the line. |
getTransparency() | Returns or sets the degree of transparency of the line as a value from 0.0 (opaque) through 1.0 (clear). |
setTransparency(number) | Returns or sets the degree of transparency of the line as a value from 0.0 (opaque) through 1.0 (clear). |
getStyle() | Represents the style of the line. |
setStyle(LineType) | Represents the style of the line. |
getWeight() | Gets or sets the WeightType of the line. |
setWeight(WeightType) | Gets or sets the WeightType of the line. |
getWeightPt() | Gets or sets the weight of the line in unit of points. |
setWeightPt(number) | Gets or sets the weight of the line in unit of points. |
getWeightPx() | Gets or sets the weight of the line in unit of pixels. |
setWeightPx(number) | Gets or sets the weight of the line in unit of pixels. |
getFormattingType() | Gets or sets format type. |
setFormattingType(ChartLineFormattingType) | Gets or sets format type. |
isAutomaticColor() | Indicates whether the color of line is automatic assigned. |
isVisible() | Represents whether the line is visible. |
setIsVisible(boolean) | Represents whether the line is visible. |
isAuto() | Indicates whether this line style is auto assigned. |
setIsAuto(boolean) | Indicates whether this line style is auto assigned. |
getGradientFill() | Represents gradient fill. |
constructor(Line)
Constructs from a parent object convertible to this.
constructor(obj: Line);
Parameters:
Parameter | Type | Description |
---|---|---|
obj | Line | The parent object. |
getType()
Represents error bar amount type.
getType() : ErrorBarType;
Returns
setType(ErrorBarType)
Represents error bar amount type.
setType(value: ErrorBarType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | ErrorBarType | The value to set. |
Example
const { Workbook, ChartType, ErrorBarType } = require("aspose.cells.node");
var workbook = new Workbook();
var 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");
var chartIndex = workbook.getWorksheets().get(0).getCharts().add(ChartType.Column, 11, 0, 27, 10);
var chart = workbook.getWorksheets().get(0).getCharts().get(chartIndex);
chart.getNSeries().add("A1:B4", true);
chart.getNSeries().setCategoryData("C1:C4");
for (var i = 0; i < chart.getNSeries().getCount(); i++)
{
var 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()
Represents the display type of error bar.
getDisplayType() : ErrorBarDisplayType;
Returns
setDisplayType(ErrorBarDisplayType)
Represents the display type of error bar.
setDisplayType(value: ErrorBarDisplayType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | ErrorBarDisplayType | The value to set. |
getAmount()
Represents amount of error bar.
getAmount() : number;
Remarks
The amount must be greater than or equal to zero.
setAmount(number)
Represents amount of error bar.
setAmount(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
Remarks
The amount must be greater than or equal to zero.
getShowMarkerTTop()
Indicates if formatting error bars with a T-top.
getShowMarkerTTop() : boolean;
setShowMarkerTTop(boolean)
Indicates if formatting error bars with a T-top.
setShowMarkerTTop(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getPlusValue()
Represents positive error amount when error bar type is Custom.
getPlusValue() : string;
setPlusValue(string)
Represents positive error amount when error bar type is Custom.
setPlusValue(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
getMinusValue()
Represents negative error amount when error bar type is Custom.
getMinusValue() : string;
setMinusValue(string)
Represents negative error amount when error bar type is Custom.
setMinusValue(value: string) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | string | The value to set. |
isNull()
Checks whether the implementation object is null.
isNull() : boolean;
getCompoundType()
Specifies the compound line type
getCompoundType() : MsoLineStyle;
Returns
setCompoundType(MsoLineStyle)
Specifies the compound line type
setCompoundType(value: MsoLineStyle) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | MsoLineStyle | The value to set. |
getDashType()
Specifies the dash line type
getDashType() : MsoLineDashStyle;
Returns
setDashType(MsoLineDashStyle)
Specifies the dash line type
setDashType(value: MsoLineDashStyle) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | MsoLineDashStyle | The value to set. |
getCapType()
Specifies the ending caps.
getCapType() : LineCapType;
Returns
setCapType(LineCapType)
Specifies the ending caps.
setCapType(value: LineCapType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | LineCapType | The value to set. |
getJoinType()
Specifies the joining caps.
getJoinType() : LineJoinType;
Returns
setJoinType(LineJoinType)
Specifies the joining caps.
setJoinType(value: LineJoinType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | LineJoinType | The value to set. |
getBeginType()
Specifies an arrowhead for the begin of a line.
getBeginType() : MsoArrowheadStyle;
Returns
setBeginType(MsoArrowheadStyle)
Specifies an arrowhead for the begin of a line.
setBeginType(value: MsoArrowheadStyle) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | MsoArrowheadStyle | The value to set. |
getEndType()
Specifies an arrowhead for the end of a line.
getEndType() : MsoArrowheadStyle;
Returns
setEndType(MsoArrowheadStyle)
Specifies an arrowhead for the end of a line.
setEndType(value: MsoArrowheadStyle) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | MsoArrowheadStyle | The value to set. |
getBeginArrowLength()
Specifies the length of the arrowhead for the begin of a line.
getBeginArrowLength() : MsoArrowheadLength;
Returns
setBeginArrowLength(MsoArrowheadLength)
Specifies the length of the arrowhead for the begin of a line.
setBeginArrowLength(value: MsoArrowheadLength) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | MsoArrowheadLength | The value to set. |
getEndArrowLength()
Specifies the length of the arrowhead for the end of a line.
getEndArrowLength() : MsoArrowheadLength;
Returns
setEndArrowLength(MsoArrowheadLength)
Specifies the length of the arrowhead for the end of a line.
setEndArrowLength(value: MsoArrowheadLength) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | MsoArrowheadLength | The value to set. |
getBeginArrowWidth()
Specifies the width of the arrowhead for the begin of a line.
getBeginArrowWidth() : MsoArrowheadWidth;
Returns
setBeginArrowWidth(MsoArrowheadWidth)
Specifies the width of the arrowhead for the begin of a line.
setBeginArrowWidth(value: MsoArrowheadWidth) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | MsoArrowheadWidth | The value to set. |
getEndArrowWidth()
Specifies the width of the arrowhead for the end of a line.
getEndArrowWidth() : MsoArrowheadWidth;
Returns
setEndArrowWidth(MsoArrowheadWidth)
Specifies the width of the arrowhead for the end of a line.
setEndArrowWidth(value: MsoArrowheadWidth) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | MsoArrowheadWidth | The value to set. |
getThemeColor()
Gets and sets the theme color.
getThemeColor() : ThemeColor;
Returns
Remarks
If the foreground color is not a theme color, NULL will be returned.
setThemeColor(ThemeColor)
Gets and sets the theme color.
setThemeColor(value: ThemeColor) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | ThemeColor | The value to set. |
Remarks
If the foreground color is not a theme color, NULL will be returned.
getColor()
Represents the Color of the line.
getColor() : Color;
Returns
setColor(Color)
Represents the Color of the line.
setColor(value: Color) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | Color | The value to set. |
getTransparency()
Returns or sets the degree of transparency of the line as a value from 0.0 (opaque) through 1.0 (clear).
getTransparency() : number;
setTransparency(number)
Returns or sets the degree of transparency of the line as a value from 0.0 (opaque) through 1.0 (clear).
setTransparency(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getStyle()
Represents the style of the line.
getStyle() : LineType;
Returns
setStyle(LineType)
Represents the style of the line.
setStyle(value: LineType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | LineType | The value to set. |
getWeight()
Gets or sets the WeightType of the line.
getWeight() : WeightType;
Returns
setWeight(WeightType)
Gets or sets the WeightType of the line.
setWeight(value: WeightType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | WeightType | The value to set. |
getWeightPt()
Gets or sets the weight of the line in unit of points.
getWeightPt() : number;
setWeightPt(number)
Gets or sets the weight of the line in unit of points.
setWeightPt(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getWeightPx()
Gets or sets the weight of the line in unit of pixels.
getWeightPx() : number;
setWeightPx(number)
Gets or sets the weight of the line in unit of pixels.
setWeightPx(value: number) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | number | The value to set. |
getFormattingType()
Gets or sets format type.
getFormattingType() : ChartLineFormattingType;
Returns
setFormattingType(ChartLineFormattingType)
Gets or sets format type.
setFormattingType(value: ChartLineFormattingType) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | ChartLineFormattingType | The value to set. |
isAutomaticColor()
Indicates whether the color of line is automatic assigned.
isAutomaticColor() : boolean;
isVisible()
Represents whether the line is visible.
isVisible() : boolean;
setIsVisible(boolean)
Represents whether the line is visible.
setIsVisible(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
isAuto()
Indicates whether this line style is auto assigned.
isAuto() : boolean;
setIsAuto(boolean)
Indicates whether this line style is auto assigned.
setIsAuto(value: boolean) : void;
Parameters:
Parameter | Type | Description |
---|---|---|
value | boolean | The value to set. |
getGradientFill()
Represents gradient fill.
getGradientFill() : GradientFill;
Returns