protected override void SetupChart()
        {
            //Setup FlexChart
            _flexChart.Header.Content    = "World GDP Ranking";
            _flexChart.Header.Style.Font = StyleInfo.ChartHeaderFont;

            _flexChart.DataSource = HierarchicalDataSource.GetFlatOrHierarchicalGDPData(true);
            _flexChart.BindingX   = "Country";

            var ser1 = new Series()
            {
                Binding = "CurrentPrices", Name = "Current Prices"
            };
            var ser2 = new Series()
            {
                Binding = "PPPValuation", Name = "PPP Valuation", ChartType = ChartType.LineSymbols
            };

            _flexChart.Series.Add(ser1);
            _flexChart.Series.Add(ser2);

            //Setup FlexPie
            _flexPie.Header.Content    = "Category-wise Total Sales";
            _flexPie.Header.Style.Font = StyleInfo.ChartHeaderFont;

            _flexPie.DataSource         = SalesDataSource.GetSeasonSales(5);
            _flexPie.BindingName        = "Name";
            _flexPie.Binding            = "TotalSales";
            _flexPie.DataLabel.Content  = "{y} : {p:0.0} % of Total";
            _flexPie.DataLabel.Position = PieLabelPosition.Center;
            _flexPie.DataLabel.Border   = true;
        }
예제 #2
0
 private void SetHierarchicalData()
 {
     flexChart1.DataSource           = HierarchicalDataSource.GetFlatOrHierarchicalGDPData(false);
     flexChart1.AxisX.GroupNames     = "Continent";
     flexChart1.AxisX.GroupItemsPath = "Items";
 }