DataTableOptions.Font Property
Retrieves font settings used to display text in a data table.
Namespace: DevExpress.Spreadsheet.Charts
Assembly: DevExpress.Spreadsheet.v24.1.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
Property Value
Type | Description |
---|---|
ShapeTextFont | A ShapeTextFont object that contains font settings. |
Property Paths
You can access this nested property as listed below:
Object Type | Path to Font |
---|---|
ChartObject |
|
Remarks
Note
SpreadsheetControl does not display highlight and fill colors in data tables.
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