Back to Devexpress

SunburstControl Class

windowsforms-devexpress-dot-xtratreemap-5408f5ec.md

latest5.2 KB
Original Source

SunburstControl Class

Displays an interactive Sunburst chart.

Namespace : DevExpress.XtraTreeMap

Assembly : DevExpress.XtraTreeMap.v25.2.UI.dll

NuGet Package : DevExpress.Win.TreeMap

Declaration

csharp
[ComVisible(true)]
[DXLicenseWinForms]
public class SunburstControl :
    HierarchicalChartControlBase
vb
<ComVisible(True)>
<DXLicenseWinForms>
Public Class SunburstControl
    Inherits HierarchicalChartControlBase

Remarks

The following image shows a sunburst chart:

The Sunburst control ships with a set of data adapters that allow you to generate items based on Flat Data Tables and Hierarchical Data Sets. You can also populate sunburst item storage manually. Sunburst allows you to specify how to group items on each level of the hierarchy.

You can use the built-in coloring algorithms to specify the sunburst items colors. Add a legend to the sunburst to show descriptions of colors used to paint sunburst items. You can also add multiple titles to include other explanatory information to the sunburst.

The Sunburst control supports multiple item selection. You can operate with selected items and use them as another control’s data source.

Sunburst allows you to use various highlight modes. End users can highlight the following elements at once:

  • A single item
  • An item and its child items
  • An item and its parent items

To get acquainted with the SunburstControl , please refer to the following section: Getting Started.

Example

This example demonstrates how to visualize flat data using the SunburstControl.

Create a SunburstFlatDataAdapter object and assign it to the SunburstControl.DataAdapter property to provide flat data to the Sunburst. Then, specify the adapter’s SunburstFlatDataAdapter.DataSource, SunburstFlatDataAdapter.LabelDataMember and SunburstFlatDataAdapter.ValueDataMember to define data source members that should be used to generate sunburst items. Add data members to the SunburstFlatDataAdapter.GroupDataMembers collection to specify how to group the sunburst’s items.

csharp
private void OnLoad(object sender, EventArgs e) {
    SunburstFlatDataAdapter dataAdapter = new SunburstFlatDataAdapter();            
    dataAdapter.ValueDataMember = "Annual";
    dataAdapter.LabelDataMember = "Product";
    dataAdapter.GroupDataMembers.AddRange(new string[] { "Category", "Country" });
    dataAdapter.DataSource = CreateProductInfos();
    sunburstControl.DataAdapter = dataAdapter;
}
vb
Class SurroundingClass
    Private Sub OnLoad(ByVal sender As Object, ByVal e As EventArgs)
        Dim dataAdapter As SunburstFlatDataAdapter = New SunburstFlatDataAdapter()
        dataAdapter.ValueDataMember = "Annual" 
        dataAdapter.LabelDataMember = "Product" 
        dataAdapter.GroupDataMembers.AddRange(New String() {"Category", "Country"})
        dataAdapter.DataSource = CreateProductInfos()
        sunburstControl.DataAdapter = dataAdapter
    End Sub 
End Class

Implements

IPrintable

Inheritance

Object MarshalByRefObject Component Control DevExpress.XtraEditors.XtraControl HierarchicalChartControlBase SunburstControl

See Also

SunburstControl Members

DevExpress.XtraTreeMap Namespace