aspose.cells

Class Floor

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

Example:

//Instantiate the License class
var 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
var workbook = new aspose.cells.Workbook();

//Get cells collection
var cells = workbook.getWorksheets().get(0).getCells();

//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.getWorksheets().get(0).getCharts();

//add a new chart 
var index = charts.add(aspose.cells.ChartType.COLUMN_3_D_STACKED, 5, 0, 15, 5);

//get the newly added chart
var chart = charts.get(index);

//set charts nseries
chart.getNSeries().add("A1:A3", true);

//Show data labels
chart.getNSeries().get(0).getDataLabels().setValueShown(true);

//Get chart's floor
var floor = chart.getFloor();

//set floor's border as red
floor.getBorder().setColor(aspose.cells.Color.getRed());

//set fill format
floor.getFillFormat().setPresetColorGradient(aspose.cells.GradientPresetType.CALM_WATER, aspose.cells.GradientStyleType.DIAGONAL_DOWN, 2);

//save the file
workbook.save("Book1.xls");

Property Getters/Setters Summary
functiongetBackgroundColor()
function
           Gets or sets the background com.aspose.cells.Color of the Area.
functiongetBorder()
function
setBorder(value)
           Gets or sets the border Line.
functiongetFillFormat()
Represents a object that contains fill formatting properties for the specified chart or shape.
functiongetForegroundColor()
function
           Gets or sets the foreground com.aspose.cells.Color.
functiongetFormatting()
function
           Represents the formatting of the area. The value of the property is FormattingType integer constant.
functiongetInvertIfNegative()
function
           If the property is true and the value of chart point is a negative number, the foreground color and background color will be exchanged.
functiongetTransparency()
function
           Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).
 
Method Summary
functionisAuto()
functionisVisible()
functionsetAuto(isAuto)
 

    • Property Getters/Setters Detail

      • getBorder/setBorder : Line 

        function getBorder() / function setBorder(value)
        
        Gets or sets the border Line.
      • getBackgroundColor/setBackgroundColor : Color 

        function getBackgroundColor() / function setBackgroundColor(value)
        
        Gets or sets the background com.aspose.cells.Color of the Area.
      • getForegroundColor/setForegroundColor : Color 

        function getForegroundColor() / function setForegroundColor(value)
        
        Gets or sets the foreground com.aspose.cells.Color.
      • getFormatting/setFormatting : Number 

        function getFormatting() / function setFormatting(value)
        
        Represents the formatting of the area. The value of the property is FormattingType integer constant.
      • getInvertIfNegative/setInvertIfNegative : boolean 

        function getInvertIfNegative() / function setInvertIfNegative(value)
        
        If the property is true and the value of chart point is a negative number, the foreground color and background color will be exchanged.

        Example:

        //Instantiating a Workbook object
        var workbook = new aspose.cells.Workbook();
        //Adding a new worksheet to the Workbook object
        var sheetIndex = workbook.getWorksheets().add();
        //Obtaining the reference of the newly added worksheet by passing its sheet index
        var worksheet = workbook.getWorksheets().get(sheetIndex);
        //Adding a sample value to "A1" cell
        worksheet.getCells().get("A1").putValue(50);
        //Adding a sample value to "A2" cell
        worksheet.getCells().get("A2").putValue(-100);
        //Adding a sample value to "A3" cell
        worksheet.getCells().get("A3").putValue(150);
        //Adding a chart to the worksheet
        var chartIndex = worksheet.getCharts().add(aspose.cells.ChartType.COLUMN, 5, 0, 15, 5);
        //Accessing the instance of the newly added chart
        var chart = worksheet.getCharts().get(chartIndex);
        //Adding NSeries (chart data source) to the chart ranging from "A1" cell to "A3"
        chart.getNSeries().add("A1:A3", true);
        chart.getNSeries().get(0).getArea().setInvertIfNegative(true);
        //Setting the foreground color of the 1st NSeries area
        chart.getNSeries().get(0).getArea().setForegroundColor(aspose.cells.Color.getRed());
        //Setting the background color of the 1st NSeries area.
        //The displayed area color of second chart point will be the background color.
        chart.getNSeries().get(0).getArea().setBackgroundColor(aspose.cells.Color.getYellow());
        //Saving the Excel file
        workbook.save("C:\\book1.xls");
      • getFillFormat : FillFormat 

        function getFillFormat()
        
        Represents a object that contains fill formatting properties for the specified chart or shape.
        See Also:
        FillFormat
      • getTransparency/setTransparency : Number 

        function getTransparency() / function setTransparency(value)
        
        Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear).
    • Method Detail

      • isAuto

        function isAuto()
      • isVisible

        function isVisible()
      • setAuto

        function setAuto(isAuto)