SettableChartGlobalizationSettings.GetAxisTitleName
SettableChartGlobalizationSettings.GetAxisTitleName method
Gets the name of Title for Axis.
public override string GetAxisTitleName()
Examples
namespace AsposeCellsExamples
{
using Aspose.Cells;
using System;
public class SettableChartGlobalizationSettingsMethodGetAxisTitleNameDemo
{
public static void Run()
{
// Create a new workbook
Workbook workbook = new Workbook();
Worksheet worksheet = workbook.Worksheets[0];
// Add minimal data for context
worksheet.Cells["A1"].PutValue("Category");
worksheet.Cells["A2"].PutValue("Item 1");
worksheet.Cells["A3"].PutValue("Item 2");
worksheet.Cells["B1"].PutValue("Value");
worksheet.Cells["B2"].PutValue(100);
worksheet.Cells["B3"].PutValue(200);
try
{
// Create an instance of SettableChartGlobalizationSettings
SettableChartGlobalizationSettings settings = new SettableChartGlobalizationSettings();
// Set a custom axis title name
settings.SetAxisTitleName("Custom Axis Title");
// Get the axis title name using GetAxisTitleName
string axisTitleName = settings.GetAxisTitleName();
Console.WriteLine("Axis Title Name: " + axisTitleName);
// Save the workbook
workbook.Save("GetAxisTitleNameDemo.xlsx");
Console.WriteLine("Workbook saved successfully.");
}
catch (Exception ex)
{
Console.WriteLine($"Error calling GetAxisTitleName: {ex.Message}");
}
}
}
}
See Also
- class SettableChartGlobalizationSettings
- namespace Aspose.Cells
- assembly Aspose.Cells