[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications, and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Expand]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Collapse]Chart Control
   [Expand]Getting Started
   [Expand]Charting Basics
   [Expand]Series Views
   [Collapse]Chart Elements
     [Expand]Diagram Types
     Chart Titles
   [Expand]Providing Data
   [Expand]Data Representation
   [Expand]Appearance Customization
   [Expand]End-User Features
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]Additional Resources
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Sunburst Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)


This section details the purpose, implementation and capabilities of a diagram in XtraCharts. Prior to reading this document, it may be useful to review the basic concepts of XtraCharts, which are described in the following document: Charting Basics.

This document consists of the following sections.

Expanded Diagram Overview

The diagram is one of the most basic chart elements, along with series, Chart Titles and the legend. Architecturally, the diagram is a parent for chart Panes and Axes, and visually - it encloses a chart's series as well. Despite the fact that series don't formally belong to the Diagram object (instead, they reside in the ChartControl's SeriesCollection), they're strongly interdependent with the diagram's type (details on this appear further on in this document), and are visually displayed within the diagram's bounds. To view the XtraCharts architecture schematically, refer to Chart Elements.

Note that it's only possible to have a single diagram object for each chart. However, within the same diagram (of the XY-Diagram 2D type), you can plot multiple panes as shown in the image above. For details, refer to Panes.

The diagram's most significant characteristic is its type. The type of the diagram depends on the view type of the chart's series. By default, it's automatically determined by the view type of the first visible series in the chart's collection. Note that the Diagram object is equal to null (Nothing in Visual Basic) until a chart has at least one series in its collection.

Thus, a diagram of each type can only display series of the appropriate view types, and it's impossible to plot multiple series of incompatible view types within the same Diagram object (and therefore, within the same chart). To learn more about this, refer to Series Views Compatibility.

In addition, for each diagram type, there is a unique set of available options and elements.

In the following list, the available diagram types are broken into several basic categories. For specific details on each diagram type, refer to the appropriate document.

Simple Diagram Simple Diagram 3D
XY-Diagram XY-Diagram 3D
Gantt Diagram Funnel Diagram 3D
Radar and Polar Diagrams Swift Plot Diagram

To access almost any of the chart's elements (excepting its Series, titles and legend), you should first access the diagram itself. How this is done (both at design and runtime) is briefly described in the following section of this document: Accessing the Diagram.

Expanded Accessing the Diagram

To access the diagram at design time, click on the diagram in the chart control to select it. Then, properties of the current diagram type will be displayed in the Properties window.

At runtime, a diagram is represented by an instance of the Diagram class, which can be accessed with the ChartControl.Diagram property. To access diagram elements and properties, cast your diagram's instance to the specific diagram's type, as the following example demonstrates.

Note that if the diagram type to which you cast your diagram object isn't appropriate (e.g., it has series of incompatible view types), an exception will be thrown.

Expanded Diagram Elements

Architecturally, the diagram is a parent for chart panes and axes. And each diagram has the deafault pane and axis of arguments and axis of values.

And for an XY-Diagram, secondary axes and additional panes can be added.

For more information about diagram elements, refer to one of the following topics.

Expanded See Also

Is this topic helpful?​​​​​​​