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.v24.2.UI.dll
Declaration
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.
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.
Example
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.EnableAntialiasing = true;
myText.Text = "There are no visible series to represent in the chart.";
myText.TextColor = Color.Beige;