Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Collapse]WinForms Controls
  Prerequisites
 [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]Pivot Grid
  [Expand]Tree List
  [Collapse]Chart Control
   [Expand]Getting Started
   [Collapse]Fundamentals
    [Expand]Charting Basics
    [Expand]Professional Charting
    [Expand]Series Views
    [Collapse]Chart Elements
     [Expand]Series
     [Collapse]Diagram
      [Expand]Diagram Types
      [Expand]Axes
      [Expand]Panes
      Chart Titles
     [Expand]Legends
     [Expand]Annotations
   [Expand]Providing Data
   [Expand]Appearance Customization
   [Expand]End-User Features
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]Examples
   [Expand]Additional Resources
  [Expand]Diagrams
  [Expand]Gauges
  [Expand]Map Control
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]Printing-Exporting
  [Expand]PDF Viewer
   Reporting
  [Expand]Snap
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Diagram

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.

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

How would you rate this topic?​​​​​​​