コード例 #1
0
        public PieChartViewModel()
        {
            this.Data = new List <PieChartModel>();

            Data.Add(new PieChartModel()
            {
                Country = "Uruguay", Count = 2807
            });
            Data.Add(new PieChartModel()
            {
                Country = "Argentina", Count = 2577
            });
            Data.Add(new PieChartModel()
            {
                Country = "USA", Count = 2473
            });
            Data.Add(new PieChartModel()
            {
                Country = "Germany", Count = 2120
            });
            Data.Add(new PieChartModel()
            {
                Country = "Netherlands", Count = 2071
            });
            Data.Add(new PieChartModel()
            {
                Country = "Malta", Count = 960
            });
            Data.Add(new PieChartModel()
            {
                Country = "Maldives", Count = 941
            });
            Data.Add(new PieChartModel()
            {
                Country = "Monaco", Count = 908
            });

            this.Population = new List <Population>();
            Population.Add(new Population()
            {
                Continent = "Asia", Countries = "China", States = "Taiwan", PopulationinContinents = 50.02, PopulationinCountries = 26.02, PopulationinStates = 18.02
            });
            Population.Add(new Population()
            {
                Continent = "Africa", Countries = "India", States = "Shandong", PopulationinContinents = 20.81, PopulationinCountries = 24, PopulationinStates = 8
            });
            Population.Add(new Population()
            {
                Continent = "Europe", Countries = "Nigeria", States = "Uttar Pradesh", PopulationinContinents = 15.37, PopulationinCountries = 12.81, PopulationinStates = 14.5
            });
            Population.Add(new Population()
            {
                Countries = "Ethiopia", States = "Maharashtra", PopulationinCountries = 8, PopulationinStates = 9.5
            });
            Population.Add(new Population()
            {
                Countries = "Germany", States = "Kano", PopulationinCountries = 8.37, PopulationinStates = 7.81
            });
            Population.Add(new Population()
            {
                Countries = "Turkey", States = "Lagos", PopulationinCountries = 7, PopulationinStates = 5
            });
            Population.Add(new Population()
            {
                States = "Oromia", PopulationinStates = 5
            });
            Population.Add(new Population()
            {
                States = "Amhara", PopulationinStates = 3
            });
            Population.Add(new Population()
            {
                States = "Hessen", PopulationinStates = 5.37
            });
            Population.Add(new Population()
            {
                States = "Bayern", PopulationinStates = 3
            });
            Population.Add(new Population()
            {
                States = "Istanbul", PopulationinStates = 4.5
            });
            Population.Add(new Population()
            {
                States = "Ankara", PopulationinStates = 2.5
            });

            this.Metrics = new List <SemiPieAndDoughnutChartModel>();
            Metrics.Add(new SemiPieAndDoughnutChartModel(43, 32));
            Metrics.Add(new SemiPieAndDoughnutChartModel(20, 34));
            Metrics.Add(new SemiPieAndDoughnutChartModel(67, 41));
            Metrics.Add(new SemiPieAndDoughnutChartModel(52, 42));
            Metrics.Add(new SemiPieAndDoughnutChartModel(71, 48));
            Metrics.Add(new SemiPieAndDoughnutChartModel(30, 45));

            StartAngle = 180;
            EndAngle   = 360;
        }
コード例 #2
0
        public DoughnutChartViewModel()
        {
            StartAngle = 180;
            EndAngle   = 360;

            this.Tax = new List <DoughnutChartModel>();

            Tax.Add(new DoughnutChartModel()
            {
                Category = "Total License", Percentage = 20d
            });
            Tax.Add(new DoughnutChartModel()
            {
                Category = "Other", Percentage = 23d
            });
            Tax.Add(new DoughnutChartModel()
            {
                Category = "Sales and Gross Receipt", Percentage = 12d
            });
            Tax.Add(new DoughnutChartModel()
            {
                Category = "Corporation Net Income", Percentage = 28d
            });
            Tax.Add(new DoughnutChartModel()
            {
                Category = "Individual Income", Percentage = 10d
            });
            Tax.Add(new DoughnutChartModel()
            {
                Category = "Sales", Percentage = 10d
            });

            this.Population = new List <DoughnutChartPopulations>();

            Population.Add(new DoughnutChartPopulations()
            {
                Continent = "Asia", Countries = "China", States = "Taiwan", PopulationinContinents = 50.02, PopulationinCountries = 26.02, PopulationinStates = 18.02
            });
            Population.Add(new DoughnutChartPopulations()
            {
                Continent = "Africa", Countries = "India", States = "Shandong", PopulationinContinents = 20.81, PopulationinCountries = 24, PopulationinStates = 8
            });
            Population.Add(new DoughnutChartPopulations()
            {
                Continent = "Europe", Countries = "Nigeria", States = "Uttar Pradesh", PopulationinContinents = 15.37, PopulationinCountries = 12.81, PopulationinStates = 14.5
            });
            Population.Add(new DoughnutChartPopulations()
            {
                Countries = "Ethiopia", States = "Maharashtra", PopulationinCountries = 8, PopulationinStates = 9.5
            });
            Population.Add(new DoughnutChartPopulations()
            {
                Countries = "Germany", States = "Kano", PopulationinCountries = 8.37, PopulationinStates = 7.81
            });
            Population.Add(new DoughnutChartPopulations()
            {
                Countries = "Turkey", States = "Lagos", PopulationinCountries = 7, PopulationinStates = 5
            });
            Population.Add(new DoughnutChartPopulations()
            {
                States = "Oromia", PopulationinStates = 5
            });
            Population.Add(new DoughnutChartPopulations()
            {
                States = "Amhara", PopulationinStates = 3
            });
            Population.Add(new DoughnutChartPopulations()
            {
                States = "Hessen", PopulationinStates = 5.37
            });
            Population.Add(new DoughnutChartPopulations()
            {
                States = "Bayern", PopulationinStates = 3
            });
            Population.Add(new DoughnutChartPopulations()
            {
                States = "Istanbul", PopulationinStates = 4.5
            });
            Population.Add(new DoughnutChartPopulations()
            {
                States = "Ankara", PopulationinStates = 2.5
            });

            ExpenditureData = new List <DoughnutChartPopulations>
            {
                new DoughnutChartPopulations()
                {
                    Category = "Vehicle", Expenditure = 62.7, Image = new Uri(@"/syncfusion.chartdemos.wpf;component/Assets/Chart/Car.png", UriKind.RelativeOrAbsolute)
                },
                new DoughnutChartPopulations()
                {
                    Category = "Education", Expenditure = 29.5, Image = new Uri(@"/syncfusion.chartdemos.wpf;component/Assets/Chart/Chart_Book.png", UriKind.RelativeOrAbsolute)
                },
                new DoughnutChartPopulations()
                {
                    Category = "Home", Expenditure = 85.2, Image = new Uri(@"/syncfusion.chartdemos.wpf;component/Assets/Chart/House.png", UriKind.RelativeOrAbsolute)
                },
                new DoughnutChartPopulations()
                {
                    Category = "Personal", Expenditure = 45.6, Image = new Uri(@"/syncfusion.chartdemos.wpf;component/Assets/Chart/Personal.png", UriKind.RelativeOrAbsolute)
                },
            };

            this.Metrics = new List <SemiPieAndDoughnutChartModel>();
            Metrics.Add(new SemiPieAndDoughnutChartModel(43, 32));
            Metrics.Add(new SemiPieAndDoughnutChartModel(20, 34));
            Metrics.Add(new SemiPieAndDoughnutChartModel(67, 41));
            Metrics.Add(new SemiPieAndDoughnutChartModel(52, 42));
            Metrics.Add(new SemiPieAndDoughnutChartModel(71, 48));
            Metrics.Add(new SemiPieAndDoughnutChartModel(30, 45));
        }