Aspose::Cells::Charts::Floor class
Contents
[
Hide
]Floor class
Encapsulates the object that represents the floor of a 3-D chart.
class Floor : public Aspose::Cells::Drawing::Area
Methods
Method | Description |
---|---|
Area(Area_Impl* impl) | Constructs from an implementation object. |
Area(const Area& src) | Copy constructor. |
Floor(Floor_Impl* impl) | Constructs from an implementation object. |
Floor(const Floor& src) | Copy constructor. |
Floor(const Area& src) | Constructs from a parent object. |
GetBackgroundColor() | Gets or sets the background Color of the Area. |
GetBorder() | Gets or sets the border Line. |
GetFillFormat() | Represents a FillFormat object that contains fill formatting properties for the specified chart or shape. |
GetForegroundColor() | Gets or sets the foreground Color. |
GetFormatting() | Represents the formatting of the area. |
GetInvertIfNegative() | If the property is true and the value of chart point is a negative number, the foreground color and background color will be exchanged. |
GetTransparency() | Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear). |
IsNull() const | Checks whether the implementation object is nullptr. |
explicit operator bool() const | operator bool() |
operator=(const Floor& src) | operator= |
operator=(const Area& src) | operator= |
SetBackgroundColor(const Aspose::Cells::Color& value) | Gets or sets the background Color of the Area. |
SetBorder(const Line& value) | Gets or sets the border Line. |
SetForegroundColor(const Aspose::Cells::Color& value) | Gets or sets the foreground Color. |
SetFormatting(FormattingType value) | Represents the formatting of the area. |
SetInvertIfNegative(bool 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. |
SetTransparency(double value) | Returns or sets the degree of transparency of the area as a value from 0.0 (opaque) through 1.0 (clear). |
~Area() | Destructor. |
~Floor() | Destructor. |
Fields
Field | Description |
---|---|
_impl | The implementation object. |
Examples
Aspose::Cells::Startup();
//Instantiate the License class
License license;
//Pass only the name of the license file embedded in the assembly
license.SetLicense(u"Aspose.Cells.lic");
//Instantiate the workbook object
Workbook workbook;
//Get cells collection
Cells cells = workbook.GetWorksheets().Get(0).GetCells();
//Put values in cells
cells.Get(u"A1").PutValue(1);
cells.Get(u"A2").PutValue(2);
cells.Get(u"A3").PutValue(3);
//get charts colletion
ChartCollection charts = workbook.GetWorksheets().Get(0).GetCharts();
//add a new chart
int index = charts.Add(ChartType::Column3DStacked, 5, 0, 15, 5);
//get the newly added chart
Chart chart = charts.Get(index);
//set charts nseries
chart.GetNSeries().Add(u"A1:A3", true);
//Show data labels
chart.GetNSeries().Get(0).GetDataLabels().SetShowValue(true);
//Get chart's floor
Floor floor = chart.GetFloor();
//set floor's border as red
floor.GetBorder().SetColor(Color{ 0xff, 0xff, 0, 0 });
//set fill format
floor.GetFillFormat().SetPresetColorGradient(GradientPresetType::CalmWater, GradientStyleType::DiagonalDown, 2);
//save the file
workbook.Save(u"dest.xls");
Aspose::Cells::Cleanup();
See Also
- Class Area
- Namespace Aspose::Cells::Charts
- Library Aspose.Cells for C++