DataTableOptions.Font Property
In This Article
Retrieves font settings used to display text in a data table.
Namespace: DevExpress.Spreadsheet.Charts
Assembly: DevExpress.Spreadsheet.v24.2.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
#Declaration
ShapeTextFont Font { get; }
#Property Value
Type | Description |
---|---|
Shape |
A Shape |
#Property Paths
You can access this nested property as listed below:
Object Type | Path to Font |
---|---|
Chart |
|
#Remarks
Note
Spreadsheet
The following code snippet creates line charts, displays the data table, and specifies the data table’s font parameters:
using DevExpress.Spreadsheet;
using DevExpress.Spreadsheet.Charts;
//...
Worksheet worksheet = workbook.Worksheets["chartTask5"];
workbook.Worksheets.ActiveWorksheet = worksheet;
// Create a chart and specify its location
Chart chart = worksheet.Charts.Add(ChartType.Line, worksheet["B2:C8"]);
chart.TopLeftCell = worksheet.Cells["F2"];
chart.BottomRightCell = worksheet.Cells["L14"];
// Display the data table
DataTableOptions dataTableOptions = chart.DataTable;
dataTableOptions.Visible = true;
dataTableOptions.ShowLegendKeys = false;
// Change font parameters
dataTableOptions.Font.Name = "Helvetica";
dataTableOptions.Font.Size = 12;
See Also