xtrareports-devexpress-dot-xtrareports-dot-ui-dot-xrchart-d4abcf69.md
Gets the chart control’s diagram and provides access to its settings.
Namespace : DevExpress.XtraReports.UI
Assembly : DevExpress.XtraReports.v25.2.dll
NuGet Package : DevExpress.Reporting.Core
[SRCategory(ReportStringId.CatElements)]
public Diagram Diagram { get; set; }
<SRCategory(ReportStringId.CatElements)>
Public Property Diagram As Diagram
| Type | Description |
|---|---|
| Diagram |
A Diagram object that represents the chart control’s diagram.
|
Note that you can’t set the Diagram property manually. It’s available to be set for serialization purposes only. For more information on the chart control’s diagram see the Diagram topic and the Diagram object ‘s description.
The following code snippets (auto-collected from DevExpress Examples) contain references to the Diagram property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.
dashboard-constant-lines/CS/ConstantLineExtension.Win/ConstantLineModule.cs#L58
if (chartControl != null && chartItem != null) {
AddConstantLinesToDiagram(chartControl.Diagram as XYDiagram, chartItem);
}
string itemComponentName = control.Key;
UpdateChartScaleBreaks(designer.Dashboard.Items[itemComponentName], xrChart.Diagram);
}
MultiPaneSettings settings = MultiPaneSettings.FromJson(chartItem.CustomProperties[customPropertyName]);
CustomizeDiagram(xrChart.Diagram as XYDiagram, xrChart.Series, settings);
}
if(constantLinesJSON != null) {
XYDiagram diagram = chartControl.Diagram as XYDiagram;
if(diagram != null) {
if(constantLinesJSON != null) {
XYDiagram diagram = chartControl.Diagram as XYDiagram;
if(diagram != null) {
Dim itemComponentName As String = control.Key
UpdateChartScaleBreaks(designer.Dashboard.Items(itemComponentName), xrChart.Diagram)
End If
Dim settings As MultiPaneSettings = MultiPaneSettings.FromJson(chartItem.CustomProperties(customPropertyName))
CustomizeDiagram(TryCast(xrChart.Diagram, XYDiagram), xrChart.Series, settings)
End If
If constantLinesJSON IsNot Nothing Then
Dim diagram As XYDiagram = TryCast(chartControl.Diagram, XYDiagram)
If diagram IsNot Nothing Then
Dim xrChart As XRChart = TryCast(control.Value, XRChart)
If xrChart IsNot Nothing AndAlso xrChart.Diagram IsNot Nothing Then
Dim chartItem As DashboardItem = dashboardControl.Dashboard.Items(control.Key)
See Also