[Expand]General Information
[Collapse]WinForms Controls
  .NET Core Support
  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]Property Grid
  [Expand]Pivot Grid
  [Expand]Tree List
  [Expand]Gantt Control
  [Expand]Chart Control
  [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
  [Collapse]Sunburst Control
   [Expand]Getting Started
    Provide Data
    Colorizers
    Highlight and Select Items
   [Expand]Examples
 [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]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Provide Data

This topic explains how to populate a sunburst with data. The Sunburst control allows you to generate items based on data-source fields and to create items manually.

This document consists of the following sections:

Expanded Overview

Use adapters that implement the ISunburstDataAdapter interface to load and render data within the Sunburst control. The Sunburst control provides three built-in adapters: the Flat Data Adapter and Hierarchical Data Adapter allow you to connect to data sources and generate items based on data-source fields; the Item Storage adapter stores sunburst items you created.

The SunburstControl.DataAdapter property allows you to assign an adapter to the sunburst.

The Sunburst control allows you to develop a custom provider. Create the class that inherits the ISunburstDataAdapter interface, and implement its ISunburstDataAdapter.Items property.

Expanded Provide Flat Data

The Sunburst control uses the SunburstFlatDataAdapter class to operate with flat data. You can specify the data members that store item value and label data. Add data member names to the GroupDataMembers collection to define how to group items.

The following sunburst uses the Flat Data Adapter to process data.

The code below configures a SunburstFlatDataAdapter object and assigns it to the sunburst.

Note

A complete sample project is available at: How to: provide flat data to Sunburst.

The following table lists members used by the code above.

Member Description
SunburstControl.DataAdapter Gets or sets the data adapter used to populate the sunburst with data.
SunburstFlatDataAdapter The data adapter that provides flat data to a sunburst.
SunburstFlatDataAdapter.ValueDataMember Specifies the data member that provides item values.
SunburstFlatDataAdapter.LabelDataMember Defines the data member that provides item label text.
SunburstFlatDataAdapter.GroupDataMembers Returns the collection of data members that specifies how to aggregate items.

Expanded Provide Hierarchical Data

The Sunburst control uses the SunburstHierarchicalDataAdapter to operate with hierarchical data. You should populate the Mappings collection with data mappings to specify how the Sunburst should convert data objects to sunburst items. A data mapping allows you to define the data members that store data for item values, and label text and child items.

The following sunburst uses the Hierachical Data Adapter to operate with data.

The following code configures a SunburstHierarchicalDataAdapter object and assigns it to the sunburst.

Note

A complete sample project is available at: How to: provide hierarchical data to Sunburst.

The code above uses the following API members.

Member Description
SunburstControl.DataAdapter Gets or sets the data adapter used to populate the sunburst with data.
SunburstHierarchicalDataAdapter The data adapter that provides hierarchical data to the sunburst.
SunburstHierarchicalDataAdapter.Mappings Returns the collection of data object mappings to sunburst items.
HierarchicalDataMapping.ValueDataMember Defines the data member that provides item values.
HierarchicalDataMapping.ChildrenDataMember Gets or sets the name of the data field whose values are used to specify child items of current level sunburst items.
HierarchicalDataMapping.LabelDataMember Specifies the data member that provides item label text.
HierarchicalDataMapping.Type Gets or sets the data object type on the current nested level.

Expanded Create Sunburst Items Manually

The Sunburst control uses SunburstItemStorage to operate with manually created items. Add new items to the Items collection. You can specify each item's value, label, and child items.

The following sunburst uses a SunburstItemStorage to store items.

The code below configures a SunburstItemStorage object and assigns it to the sunburst.

The following table lists members used in the code above.

Member Description
SunburstControl.DataAdapter Gets or sets the data adapter used to populate the sunburst with data.
SunburstItemStorage The data adapter that stores the item collection and provides it to a sunburst.
SunburstItemStorage.Items Returns the sunburst item collection.
SunburstItem A sunburst item.
SunburstItem.Children The sunburst item's child elements.
SunburstItem.Value Gets or sets the sunburst item's value.
SunburstItem.Label Gets or sets the sunburst item's label.

Expanded See Also

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