コード例 #1
0
        private void InitColChart()
        {
            ChartValues <int> memValues = new ChartValues <int>();
            ChartValues <int> empValues = new ChartValues <int>();

            foreach (var org in PartyBuildingContext.org2news)
            {
                ColLabels.Add(org.comp_name);
                memValues.Add(org.mem_count_dy);
                empValues.Add(org.emp_count);
            }

            ColSeries.Add(new ColumnSeries
            {
                Title  = "党员数",
                Values = memValues,
                Fill   = new SolidColorBrush(Color.FromRgb(0, 255, 0))
            });
            ColSeries.Add(new ColumnSeries
            {
                Title  = "职工数",
                Values = empValues,
                Fill   = new SolidColorBrush(Color.FromRgb(0, 0, 255))
            });
        }
コード例 #2
0
ファイル: dxscg.xaml.cs プロジェクト: radtek/work-1
        private void InitColChart()
        {
            var groups = allDxscg.GroupBy(m => m.town);

            ChartValues <int> values = new ChartValues <int>();

            foreach (var gp in groups)
            {
                ColLabels.Add((string)gp.Key);
                values.Add(gp.Count());
            }

            ColSeries.Add(new ColumnSeries
            {
                Title  = "村官数",
                Values = values,
                Fill   = new SolidColorBrush(Color.FromRgb(0, 255, 0))
            });
        }
コード例 #3
0
ファイル: dy.xaml.cs プロジェクト: radtek/work-1
        private void InitColChart()
        {
            var groups = dyAll.GroupBy(m => m.town);

            ChartValues <int> memValues = new ChartValues <int>();

            foreach (var gp in groups)
            {
                ColLabels.Add(gp.Key);
                memValues.Add(gp.Count());
            }

            ColSeries.Add(new ColumnSeries
            {
                Title  = "党员人数",
                Values = memValues,
                Fill   = new SolidColorBrush(Color.FromRgb(0, 255, 0))
            });
        }