Floor

Floor class

Encapsulates the object that represents the floor of a 3-D chart.

class Floor extends Area;

Example

const { License, Workbook, ChartType, Color, GradientPresetType, GradientStyleType } = require("aspose.cells.node");

//Instantiate the License class
var license = new License();
license.setLicense("input/Aspose.Cells.lic");

//Instantiate the workbook object
var workbook = new Workbook();
//Get cells collection
var cells = workbook.worksheets.get(0).cells;
//Put values in cells
cells.get("A1").putValue(1);
cells.get("A2").putValue(2);
cells.get("A3").putValue(3);

//get charts colletion
var charts = workbook.worksheets.get(0).charts;
//add a new chart 
var index = charts.add(ChartType.Column3DStacked, 5, 0, 15, 5);
//get the newly added chart
var chart = charts.get(index);
//set charts nseries
chart.nSeries.add("A1:A3", true);
//Show data labels
chart.nSeries.get(0).dataLabels.showValue = true;

//Get chart's floor
var floor = chart.floor;
//set floor's border as red
floor.border.color = new Color("red");
//set fill format
floor.fillFormat.setPresetColorGradient(GradientPresetType.CalmWater, GradientStyleType.DiagonalDown, 2);

//save the file
workbook.save("output/ChartsFloor.xls");

Constructors

ConstructorDescription
constructor(Area)Constructs from a parent object convertible to this.

Properties

PropertyTypeDescription
borderLineGets or sets the border Line.
backgroundColorColorGets or sets the background Color of the Area.
foregroundColorColorGets or sets the foreground Color.
formattingFormattingTypeRepresents the formatting of the area.
invertIfNegativebooleanIf the property is true and the value of chart point is a negative number, the foreground color and background color will be exchanged.
fillFormatFillFormatReadonly. Represents a FillFormat object that contains fill formatting properties for the specified chart or shape.
transparencynumberReturns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).

Methods

MethodDescription
getBorder()@deprecated. Please use the ‘border’ property instead. Gets or sets the border Line.
setBorder(Line)@deprecated. Please use the ‘border’ property instead. Gets or sets the border Line.
isNull()Checks whether the implementation object is null.
getBackgroundColor()@deprecated. Please use the ‘backgroundColor’ property instead. Gets or sets the background Color of the Area.
setBackgroundColor(Color)@deprecated. Please use the ‘backgroundColor’ property instead. Gets or sets the background Color of the Area.
getForegroundColor()@deprecated. Please use the ‘foregroundColor’ property instead. Gets or sets the foreground Color.
setForegroundColor(Color)@deprecated. Please use the ‘foregroundColor’ property instead. Gets or sets the foreground Color.
getFormatting()@deprecated. Please use the ‘formatting’ property instead. Represents the formatting of the area.
setFormatting(FormattingType)@deprecated. Please use the ‘formatting’ property instead. Represents the formatting of the area.
getInvertIfNegative()@deprecated. Please use the ‘invertIfNegative’ property instead. If the property is true and the value of chart point is a negative number, the foreground color and background color will be exchanged.
setInvertIfNegative(boolean)@deprecated. Please use the ‘invertIfNegative’ property instead. If the property is true and the value of chart point is a negative number, the foreground color and background color will be exchanged.
getFillFormat()@deprecated. Please use the ‘fillFormat’ property instead. Represents a FillFormat object that contains fill formatting properties for the specified chart or shape.
getTransparency()@deprecated. Please use the ’transparency’ property instead. Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).
setTransparency(number)@deprecated. Please use the ’transparency’ property instead. Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).

constructor(Area)

Constructs from a parent object convertible to this.

constructor(obj: Area);

Parameters:

ParameterTypeDescription
objAreaThe parent object.

border

Gets or sets the border Line.

border : Line;

backgroundColor

Gets or sets the background Color of the Area.

backgroundColor : Color;

foregroundColor

Gets or sets the foreground Color.

foregroundColor : Color;

formatting

Represents the formatting of the area.

formatting : FormattingType;

invertIfNegative

If the property is true and the value of chart point is a negative number, the foreground color and background color will be exchanged.

invertIfNegative : boolean;

fillFormat

Readonly. Represents a FillFormat object that contains fill formatting properties for the specified chart or shape.

fillFormat : FillFormat;

transparency

Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).

transparency : number;

getBorder()

@deprecated. Please use the ‘border’ property instead. Gets or sets the border Line.

getBorder() : Line;

Returns

Line

setBorder(Line)

@deprecated. Please use the ‘border’ property instead. Gets or sets the border Line.

setBorder(value: Line) : void;

Parameters:

ParameterTypeDescription
valueLineThe value to set.

isNull()

Checks whether the implementation object is null.

isNull() : boolean;

getBackgroundColor()

@deprecated. Please use the ‘backgroundColor’ property instead. Gets or sets the background Color of the Area.

getBackgroundColor() : Color;

Returns

Color

setBackgroundColor(Color)

@deprecated. Please use the ‘backgroundColor’ property instead. Gets or sets the background Color of the Area.

setBackgroundColor(value: Color) : void;

Parameters:

ParameterTypeDescription
valueColorThe value to set.

getForegroundColor()

@deprecated. Please use the ‘foregroundColor’ property instead. Gets or sets the foreground Color.

getForegroundColor() : Color;

Returns

Color

setForegroundColor(Color)

@deprecated. Please use the ‘foregroundColor’ property instead. Gets or sets the foreground Color.

setForegroundColor(value: Color) : void;

Parameters:

ParameterTypeDescription
valueColorThe value to set.

getFormatting()

@deprecated. Please use the ‘formatting’ property instead. Represents the formatting of the area.

getFormatting() : FormattingType;

Returns

FormattingType

setFormatting(FormattingType)

@deprecated. Please use the ‘formatting’ property instead. Represents the formatting of the area.

setFormatting(value: FormattingType) : void;

Parameters:

ParameterTypeDescription
valueFormattingTypeThe value to set.

getInvertIfNegative()

@deprecated. Please use the ‘invertIfNegative’ property instead. If the property is true and the value of chart point is a negative number, the foreground color and background color will be exchanged.

getInvertIfNegative() : boolean;

setInvertIfNegative(boolean)

@deprecated. Please use the ‘invertIfNegative’ property instead. If the property is true and the value of chart point is a negative number, the foreground color and background color will be exchanged.

setInvertIfNegative(value: boolean) : void;

Parameters:

ParameterTypeDescription
valuebooleanThe value to set.

getFillFormat()

@deprecated. Please use the ‘fillFormat’ property instead. Represents a FillFormat object that contains fill formatting properties for the specified chart or shape.

getFillFormat() : FillFormat;

Returns

FillFormat

getTransparency()

@deprecated. Please use the ’transparency’ property instead. Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).

getTransparency() : number;

setTransparency(number)

@deprecated. Please use the ’transparency’ property instead. Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).

setTransparency(value: number) : void;

Parameters:

ParameterTypeDescription
valuenumberThe value to set.