Interface IChartTextArea
Represents the Text Area in a chart.
public interface IChartTextArea : IFont, IExcelApplication, IOptimizedUpdate
- Inherited Members
Properties
BackgroundMode
Display mode of the background.
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["B2:C6"];
//Set chart type
chart.ChartType = ExcelChartType.Cone3DClustered;
//Set the Area's text in the chart
chart.ChartTitleArea.Text = "Student Chart";
//Set the Display mode of the background
chart.ChartTitleArea.BackgroundMode = ChartBackgroundMode.Opaque;
//Save to file
workbook.SaveToFile("Chart.xlsx");
ChartBackgroundMode BackgroundMode { get; set; }
Property Value
FrameFormat
Return format of the text area.
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["B2:C6"];
//Set chart type
chart.ChartType = ExcelChartType.Cone3DClustered;
//Get the formatting options of the chart for text area
chart.ChartTitleArea.Text = "Student Chart";
chart.ChartTitleArea.FrameFormat.Border.Color = Color.Brown;
chart.ChartTitleArea.FrameFormat.Interior.Pattern = ExcelPatternType.Percent25;
//Save to file
workbook.SaveToFile("Chart.xlsx");
IChartFrameFormat FrameFormat { get; }
Property Value
IsAutoMode
True if background is set to automatic.
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["B2:C6"];
//Set chart type
chart.ChartType = ExcelChartType.Cone3DClustered;
//Set the Area's text in the chart
chart.ChartTitleArea.Text = "Student Chart";
//True if background is set to automatic
Console.WriteLine(chart.ChartTitleArea.IsAutoMode);
//Save to file
workbook.SaveToFile("Chart.xlsx");
bool IsAutoMode { get; }
Property Value
Text
Area's text.Some items(such as legend,axis...) maybe invalid.
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["B2:C6"];
//Set chart type
chart.ChartType = ExcelChartType.Cone3DClustered;
//Set the Area's text in the chart
chart.ChartTitleArea.Text = "Student Chart";
//Save to file
workbook.SaveToFile("Chart.xlsx");
string Text { get; set; }
Property Value
TextRotationAngle
Text rotation angle.
//Create worksheet
Workbook workbook = new Workbook();
workbook.LoadFromFile("Sample.xlsx");
Worksheet worksheet = workbook.Worksheets[0];
//Create chart
IChart chart = worksheet.Charts.Add();
//Set range
chart.DataRange = worksheet.Range["B2:C6"];
//Set chart type
chart.ChartType = ExcelChartType.Cone3DClustered;
//Set the Area's text in the chart
chart.ChartTitleArea.Text = "Student Chart";
//Set the Text rotation angle
chart.ChartTitleArea.TextRotationAngle = 30;
//Save to file
workbook.SaveToFile("Chart.xlsx");
int TextRotationAngle { get; set; }