SunburstFlatDataAdapter Class
The data adapter that provides flat data to a sunburst.
Namespace: DevExpress.XtraTreeMap
Assembly: DevExpress.XtraTreeMap.v24.2.dll
Declaration
public class SunburstFlatDataAdapter :
SunburstDataAdapterBase,
IFlatDataAdapter,
IDataSourceProvider,
IGroupIndexProvider
Remarks
This data adapter introduces the SunburstFlatDataAdapter.DataSource property that allows you to specify the adapter’s data source, and the SunburstFlatDataAdapter.DataMember, SunburstFlatDataAdapter.LabelDataMember and SunburstFlatDataAdapter.ValueDataMember properties that allow you to specify the data members whose values are used as an item, item’s label and item’s value.
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.
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;
}