Aspose::Cells::Charts::IChartArea Class Referenceabstract

Encapsulates the object that represents the chart area in the worksheet. More...

Inherits Aspose::Cells::Charts::IChartFrame.

Public Member Functions

virtual Aspose::Cells::Systems::Int32 GetX ()=0
 Gets the horizontal offset from its upper left corner column. More...
 
virtual void SetX (Aspose::Cells::Systems::Int32 value)=0
 Sets the horizontal offset from its upper left corner column. More...
 
virtual Aspose::Cells::Systems::Int32 GetY ()=0
 Gets the vertical offset from its upper left corner row.
More...
 
virtual void SetY (Aspose::Cells::Systems::Int32 value)=0
 Sets the vertical offset from its upper left corner row.
More...
 
virtual Aspose::Cells::Systems::Int32 GetHeight ()=0
 Gets the vertical offset from its lower right corner row.
More...
 
virtual void SetHeight (Aspose::Cells::Systems::Int32 value)=0
 Sets the vertical offset from its lower right corner row.
More...
 
virtual Aspose::Cells::Systems::Int32 GetWidth ()=0
 Gets the horizontal offset from its lower right corner column.
More...
 
virtual void SetWidth (Aspose::Cells::Systems::Int32 value)=0
 Sets the horizontal offset from its lower right corner column.
More...
 
virtual intrusive_ptr< Aspose::Cells::IFontGetIFont ()=0
 Gets a IFont object of the specified chartarea object. More...
 
- Public Member Functions inherited from Aspose::Cells::Charts::IChartFrame
virtual bool IsInnerMode ()=0
 Indicates whether the size of the plot area size includes the tick marks, and the axis labels. False specifies that the size shall determine the size of the plot area, the tick marks, and the axis labels. More...
 
virtual void SetInnerMode (bool value)=0
 Indicates whether the size of the plot area size includes the tick marks, and the axis labels. False specifies that the size shall determine the size of the plot area, the tick marks, and the axis labels. More...
 
virtual intrusive_ptr< Aspose::Cells::Drawing::ILineGetBorderILine ()=0
 Gets the border More...
 
virtual intrusive_ptr< Aspose::Cells::Drawing::IAreaGetIArea ()=0
 Gets the area More...
 
virtual intrusive_ptr< Aspose::Cells::IFontGetTextIFont ()=0
 Gets a IFont object of the specified ChartFrame object. More...
 
virtual bool GetAutoScaleFont ()=0
 True if the text in the object changes font size when the object size changes. The default value is True. More...
 
virtual void SetAutoScaleFont (bool value)=0
 True if the text in the object changes font size when the object size changes. The default value is True. More...
 
virtual Aspose::Cells::Charts::BackgroundMode GetBackgroundMode ()=0
 Gets the display mode of the background More...
 
virtual void SetBackgroundMode (Aspose::Cells::Charts::BackgroundMode value)=0
 Sets the display mode of the background More...
 
virtual Aspose::Cells::Charts::BackgroundMode GetBackground ()=0
 Gets the display mode of the background More...
 
virtual void SetBackground (Aspose::Cells::Charts::BackgroundMode value)=0
 Sets the display mode of the background More...
 
virtual bool IsAutomaticSize ()=0
 Indicates whether the chart frame is automatic sized. More...
 
virtual void SetAutomaticSize (bool value)=0
 Indicates whether the chart frame is automatic sized. More...
 
virtual bool GetShadow ()=0
 True if the frame has a shadow. More...
 
virtual void SetShadow (bool value)=0
 True if the frame has a shadow. More...
 
virtual intrusive_ptr< Aspose::Cells::Drawing::IShapePropertyCollectionGetIShapeProperties ()=0
 Gets the IShapePropertyCollection object. More...
 
virtual bool IsDefaultPosBeSet ()=0
 Indicates whether default position(DefaultX, DefaultY, DefaultWidth and DefaultHeight) are set. More...
 
virtual Aspose::Cells::Systems::Int32 GetDefaultX ()=0
 Represents x of default position More...
 
virtual Aspose::Cells::Systems::Int32 GetDefaultY ()=0
 Represents y of default position More...
 
virtual Aspose::Cells::Systems::Int32 GetDefaultWidth ()=0
 Represents width of default position More...
 
virtual Aspose::Cells::Systems::Int32 GetDefaultHeight ()=0
 Represents height of default position More...
 
virtual void SetPositionAuto ()=0
 Set position of the frame to automatic More...
 

Detailed Description

Encapsulates the object that represents the chart area in the worksheet.

[C++]
//Instantiating a Workbook object
intrusive_ptr<IWorkbook> workbook = Factory::CreateIWorkbook();
//Obtaining the reference of the first worksheet
intrusive_ptr<IWorksheet> worksheet = workbook->GetIWorksheets()->GetObjectByIndex(0);
//Adding a sample value to "A1" cell
worksheet->GetICells()->GetObjectByIndex(new String("A1"))->PutValue(50);
//Adding a sample value to "A2" cell
worksheet->GetICells()->GetObjectByIndex(new String("A2"))->PutValue(100);
//Adding a sample value to "A3" cell
worksheet->GetICells()->GetObjectByIndex(new String("A3"))->PutValue(150);
//Adding a sample value to "B1" cell
worksheet->GetICells()->GetObjectByIndex(new String("B1"))->PutValue(60);
//Adding a sample value to "A2" cell
worksheet->GetICells()->GetObjectByIndex(new String("B2"))->PutValue(32);
//Adding a sample value to "A3" cell
worksheet->GetICells()->GetObjectByIndex(new String("B3"))->PutValue(50);
//Adding a chart to the worksheet
int chartIndex = worksheet->GetICharts()->Add(ChartType_Column, 5, 0, 15, 5);
//Accessing the instance of the newly added chart
intrusive_ptr<IChart> chart = worksheet->GetICharts()->GetObjectByIndex(chartIndex);
//Adding NSeries (chart data source) to the chart ranging from "A1" cell to "B3"
chart->GetNISeries()->Add(new String("A1:B3"), true);
//Getting Chart Area
intrusive_ptr<IChartArea> chartArea = chart->GetIChartArea();
//Setting the foreground color of the chart area
chartArea->GetIArea()->SetForegroundColor(Systems::Drawing::Color::GetYellow());
//Setting Chart Area Shadow
chartArea->SetShadow(true);
//Saving the Excel file
workbook->Save(new String("D:\\test\\ChartAreaTest.xls"));

Member Function Documentation

◆ GetHeight()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::Charts::IChartArea::GetHeight ( )
pure virtual

Gets the vertical offset from its lower right corner row.

Implements Aspose::Cells::Charts::IChartFrame.

◆ GetIFont()

virtual intrusive_ptr<Aspose::Cells::IFont> Aspose::Cells::Charts::IChartArea::GetIFont ( )
pure virtual

Gets a IFont object of the specified chartarea object.

Implements Aspose::Cells::Charts::IChartFrame.

◆ GetWidth()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::Charts::IChartArea::GetWidth ( )
pure virtual

Gets the horizontal offset from its lower right corner column.

Implements Aspose::Cells::Charts::IChartFrame.

◆ GetX()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::Charts::IChartArea::GetX ( )
pure virtual

Gets the horizontal offset from its upper left corner column.

Implements Aspose::Cells::Charts::IChartFrame.

◆ GetY()

virtual Aspose::Cells::Systems::Int32 Aspose::Cells::Charts::IChartArea::GetY ( )
pure virtual

Gets the vertical offset from its upper left corner row.

Implements Aspose::Cells::Charts::IChartFrame.

◆ SetHeight()

virtual void Aspose::Cells::Charts::IChartArea::SetHeight ( Aspose::Cells::Systems::Int32  value)
pure virtual

Sets the vertical offset from its lower right corner row.

Implements Aspose::Cells::Charts::IChartFrame.

◆ SetWidth()

virtual void Aspose::Cells::Charts::IChartArea::SetWidth ( Aspose::Cells::Systems::Int32  value)
pure virtual

Sets the horizontal offset from its lower right corner column.

Implements Aspose::Cells::Charts::IChartFrame.

◆ SetX()

virtual void Aspose::Cells::Charts::IChartArea::SetX ( Aspose::Cells::Systems::Int32  value)
pure virtual

Sets the horizontal offset from its upper left corner column.

Implements Aspose::Cells::Charts::IChartFrame.

◆ SetY()

virtual void Aspose::Cells::Charts::IChartArea::SetY ( Aspose::Cells::Systems::Int32  value)
pure virtual

Sets the vertical offset from its upper left corner row.

Implements Aspose::Cells::Charts::IChartFrame.