ChartControl.EmptyChartText Property

Provides access to the settings of the text to be displayed in the chart control, when it has no data to display.

Namespace: DevExpress.XtraCharts

Assembly: DevExpress.XtraCharts.v20.1.UI.dll

Declaration

public EmptyChartText EmptyChartText { get; }
Public ReadOnly Property EmptyChartText As EmptyChartText

Property Value

Type Description
EmptyChartText

An EmptyChartText object, representing the empty chart text options.

Remarks

Use the EmptyChartText to access and specify the options of the text displayed by a chart at runtime.

EmptyChartText

NOTE

The text that indicates that the chart has no data to display appears at runtime in the following cases:

  • when the SimpleDiagram is used with an empty point series;
  • when it is impossible to determine the diagram type because no Series are added and/or the series template is not defined.

To access options of the text that indicates that the chart is too small for its diagram to be drawn, use the ChartControl.SmallChartText property.

For the WebChartControl, use the similar WebChartControl.EmptyChartText property.

Examples

This example demonstrates how to provide a text for a chart, which it should display at runtime, when there's no data to be represented by the chart.

EmptyChartText myText = chartControl1.EmptyChartText;
myText.Antialiasing = true;
myText.Text = "There are no visible series to represent in the chart.";
myText.TextColor = Color.Beige;
See Also