public static ChartsModel.Sunburst Create()
        {
            var chart = new ChartsModel.Sunburst();

            //chart.GroupDataMembers = new string[] { "Quarter", "Month" };
            //chart.LabelDataMember = "Week";
            //chart.ValueDataMember = "Sales";
            //SetFlatDataAdapter(chart);

            ChartsModel.HierarchicalChartHierarchicalDataAdapter adapter = new ChartsModel.HierarchicalChartHierarchicalDataAdapter();
            chart.DataAdapter = adapter;

            HierarchicalChartDataMapping mapping = new HierarchicalChartDataMapping();

            mapping.LabelDataMember    = "Label";
            mapping.ValueDataMember    = "Value";
            mapping.ColorDataMember    = "Color";
            mapping.ChildrenDataMember = "Children";
            mapping.Type     = typeof(HierarchicalData);
            adapter.Mappings = new List <HierarchicalChartDataMapping>()
            {
                mapping
            };

            var data = HierarchicalData.GetSampleData();

            chart.DataSource = data;

            chart.LabelFormatter = new SunburstDataLabelFormatter();

            chart.Palette = new ChartsModel.Palette(chart);
            chart.Palette.Entries.Add(new ChartsModel.PaletteEntry(new ChartsModel.ColorARGB(0xff, 0x44, 0x72, 0xc4)));
            chart.Palette.Entries.Add(new ChartsModel.PaletteEntry(new ChartsModel.ColorARGB(0xff, 0xed, 0x7d, 0x31)));
            chart.Palette.Entries.Add(new ChartsModel.PaletteEntry(new ChartsModel.ColorARGB(0xff, 0xa5, 0xa5, 0xa5)));

            //chart.An

            chart.Titles.Add(new ChartTitle()
            {
                Lines = new string[] { "MultiLine", "Title" }, Font = new FontModel()
                {
                    Bold = true, Italic = true, Size = 16
                }
            });
            chart.Titles.Add(new ChartTitle()
            {
                Lines = new string[] { "Second Title" }, Font = new FontModel()
                {
                    Size = 20
                }
            });

            return(chart);
        }
        private static HierarchicalChartFlatDataAdapter SetFlatDataAdapter(ChartsModel.Sunburst chart)
        {
            ChartsModel.HierarchicalChartFlatDataAdapter adapter = new HierarchicalChartFlatDataAdapter();
            chart.DataAdapter = adapter;

            adapter.GroupDataMembers = new string[] { "Meal" };
            adapter.LabelDataMember  = "Product";
            adapter.ValueDataMember  = "Amount";
            adapter.ColorDataMember  = "Color";
            return(adapter);
        }