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, SaveFormat } = AsposeCells;

//Instantiate the License class
var license = new License();
license.setLicense(data);

//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
var uint8Array = workbook.save(SaveFormat.Excel97To2003);

Constructors

NameDescription
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).

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;