Class Floor

Floor class

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

public class Floor : Area

Properties

NameDescription
BackgroundColor { get; set; }Gets or sets the background Color of the Area.(Inherited from Area.)
Border { get; set; }Gets or sets the border Line.
FillFormat { get; }Represents a FillFormat object that contains fill formatting properties for the specified chart or shape.(Inherited from Area.)
ForegroundColor { get; set; }Gets or sets the foreground Color.(Inherited from Area.)
Formatting { get; set; }Represents the formatting of the area.(Inherited from Area.)
InvertIfNegative { get; set; }If the property is true and the value of chart point is a negative number, the foreground color and background color will be exchanged.(Inherited from Area.)
Transparency { get; set; }Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).(Inherited from Area.)

Examples


[C#]

//Instantiate the License class
Aspose.Cells.License license = new Aspose.Cells.License();

//Pass only the name of the license file embedded in the assembly
license.SetLicense("Aspose.Cells.lic");

//Instantiate the workbook object
Workbook workbook = new Workbook();

//Get cells collection
Cells cells = workbook.Worksheets[0].Cells;

//Put values in cells
cells["A1"].PutValue(1);

cells["A2"].PutValue(2);

cells["A3"].PutValue(3);

//get charts colletion
ChartCollection charts = workbook.Worksheets[0].Charts;

//add a new chart 
int index = charts.Add(ChartType.Column3DStacked, 5, 0, 15, 5);

//get the newly added chart
Chart chart = charts[index];

//set charts nseries
chart.NSeries.Add("A1:A3", true);

//Show data labels
chart.NSeries[0].DataLabels.ShowValue = true;

//Get chart's floor
Floor floor = chart.Floor;

//set floor's border as red
floor.Border.Color = System.Drawing.Color.Red;

//set fill format
floor.FillFormat.SetPresetColorGradient(GradientPresetType.CalmWater, GradientStyleType.DiagonalDown, 2); 

//save the file
workbook.Save(@"dest.xls");

[VB.NET]

'Instantiate the License class
Dim license As New Aspose.Cells.License()

'Pass only the name of the license file embedded in the assembly
license.SetLicense("Aspose.Cells.lic")

'Instantiate the workbook object
Dim workbook As Workbook = New Workbook()

'Get cells collection
Dim cells As Cells = workbook.Worksheets(0).Cells

'Put values in cells
cells("A1").PutValue(1)

cells("A2").PutValue(2)

cells("A3").PutValue(3)

'get charts colletion
Dim charts As ChartCollection = workbook.Worksheets(0).Charts

'add a new chart 
Dim index As Integer = charts.Add(ChartType.Column3DStacked, 5, 0, 15, 5)

'get the newly added chart
Dim chart As Chart = charts(index)

'set charts nseries
chart.NSeries.Add("A1:A3", True)

'Show data labels
chart.NSeries(0).DataLabels.ShowValue = True

'Get chart's floor
Dim floor As Floor = chart.Floor

'set floor's border as red
floor.Border.Color = System.Drawing.Color.Red

'set fill format
floor.FillFormat.SetPresetColorGradient(GradientPresetType.CalmWater, GradientStyleType.DiagonalDown, 2)

'save the file
workbook.Save("dest.xls")

See Also