Aspose::Words::Drawing::Charts::ChartTitle Class Reference

Detailed Description

Provides access to the chart title properties.

Examples

Shows how to insert a chart and set a title.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
// Insert a chart shape with a document builder and get its chart.
SharedPtr<Shape> chartShape = builder->InsertChart(ChartType::Bar, 400, 300);
SharedPtr<Chart> chart = chartShape->get_Chart();
// Use the "Title" property to give our chart a title, which appears at the top center of the chart area.
SharedPtr<ChartTitle> title = chart->get_Title();
title->set_Text(u"My Chart");
// Set the "Show" property to "true" to make the title visible.
title->set_Show(true);
// Set the "Overlay" property to "true" Give other chart elements more room by allowing them to overlap the title
title->set_Overlay(true);
doc->Save(ArtifactsDir + u"Charts.ChartTitle.docx");

#include <Aspose.Words.Cpp/Drawing/Charts/ChartTitle.h>

+ Inheritance diagram for Aspose::Words::Drawing::Charts::ChartTitle:

Public Member Functions

bool get_Overlay () const
 Determines whether other chart elements shall be allowed to overlap title. By default overlay is false. More...
 
bool get_Show ()
 Determines whether the title shall be shown for this chart. Default value is true. More...
 
String get_Text ()
 Gets or sets the text of the chart title. If null or empty value is specified, auto generated title will be shown. More...
 
virtual const TypeInfoGetType () const override
 
virtual bool Is (const TypeInfo &target) const override
 
void set_Overlay (bool value)
 Setter for get_Overlay. More...
 
void set_Show (bool value)
 Setter for get_Show. More...
 
void set_Text (const String &value)
 Setter for get_Text. More...
 

Static Public Member Functions

static const TypeInfoType ()
 

Member Function Documentation

◆ get_Overlay()

bool Aspose::Words::Drawing::Charts::ChartTitle::get_Overlay ( ) const

Determines whether other chart elements shall be allowed to overlap title. By default overlay is false.

Examples

Shows how to insert a chart and set a title.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
// Insert a chart shape with a document builder and get its chart.
SharedPtr<Shape> chartShape = builder->InsertChart(ChartType::Bar, 400, 300);
SharedPtr<Chart> chart = chartShape->get_Chart();
// Use the "Title" property to give our chart a title, which appears at the top center of the chart area.
SharedPtr<ChartTitle> title = chart->get_Title();
title->set_Text(u"My Chart");
// Set the "Show" property to "true" to make the title visible.
title->set_Show(true);
// Set the "Overlay" property to "true" Give other chart elements more room by allowing them to overlap the title
title->set_Overlay(true);
doc->Save(ArtifactsDir + u"Charts.ChartTitle.docx");

◆ get_Show()

bool Aspose::Words::Drawing::Charts::ChartTitle::get_Show ( )

Determines whether the title shall be shown for this chart. Default value is true.

Examples

Shows how to insert a chart and set a title.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
// Insert a chart shape with a document builder and get its chart.
SharedPtr<Shape> chartShape = builder->InsertChart(ChartType::Bar, 400, 300);
SharedPtr<Chart> chart = chartShape->get_Chart();
// Use the "Title" property to give our chart a title, which appears at the top center of the chart area.
SharedPtr<ChartTitle> title = chart->get_Title();
title->set_Text(u"My Chart");
// Set the "Show" property to "true" to make the title visible.
title->set_Show(true);
// Set the "Overlay" property to "true" Give other chart elements more room by allowing them to overlap the title
title->set_Overlay(true);
doc->Save(ArtifactsDir + u"Charts.ChartTitle.docx");

◆ get_Text()

System::String Aspose::Words::Drawing::Charts::ChartTitle::get_Text ( )

Gets or sets the text of the chart title. If null or empty value is specified, auto generated title will be shown.

Examples

Shows how to insert a chart and set a title.

auto doc = MakeObject<Document>();
auto builder = MakeObject<DocumentBuilder>(doc);
// Insert a chart shape with a document builder and get its chart.
SharedPtr<Shape> chartShape = builder->InsertChart(ChartType::Bar, 400, 300);
SharedPtr<Chart> chart = chartShape->get_Chart();
// Use the "Title" property to give our chart a title, which appears at the top center of the chart area.
SharedPtr<ChartTitle> title = chart->get_Title();
title->set_Text(u"My Chart");
// Set the "Show" property to "true" to make the title visible.
title->set_Show(true);
// Set the "Overlay" property to "true" Give other chart elements more room by allowing them to overlap the title
title->set_Overlay(true);
doc->Save(ArtifactsDir + u"Charts.ChartTitle.docx");

◆ GetType()

virtual const System::TypeInfo & Aspose::Words::Drawing::Charts::ChartTitle::GetType ( ) const
overridevirtual

◆ Is()

virtual bool Aspose::Words::Drawing::Charts::ChartTitle::Is ( const System::TypeInfo target) const
overridevirtual

◆ set_Overlay()

void Aspose::Words::Drawing::Charts::ChartTitle::set_Overlay ( bool  value)

◆ set_Show()

void Aspose::Words::Drawing::Charts::ChartTitle::set_Show ( bool  value)

◆ set_Text()

void Aspose::Words::Drawing::Charts::ChartTitle::set_Text ( const System::String value)

◆ Type()

static const System::TypeInfo & Aspose::Words::Drawing::Charts::ChartTitle::Type ( )
static