Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

DataTableOptions.Font Property

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
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
.DataTable .Font

#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:

chart data table with 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