예제 #1
0
        public override SeriesCollection GeneerateSeries()
        {
            SeriesCollection     seriesCollection = new SeriesCollection();
            ChartValues <double> chartValues      = new ChartValues <double>();


            var test = ChartSelect.ChangeToPercents(listCarParks);

            listCarParks = SortByCount(listCarParks.OrderBy(x => x.count).ToList());
            test         = SortByCount(test.OrderBy(x => x.count).ToList());

            foreach (var item in test)
            {
                chartValues.Add(item.count);
            }

            seriesCollection.Add(new LineSeries
            {
                Title           = listCarParks[0].name,
                Values          = chartValues,
                StrokeThickness = 3,
                StrokeDashArray = new System.Windows.Media.DoubleCollection(20),
                Stroke          = System.Windows.Media.Brushes.Blue,
                Fill            = System.Windows.Media.Brushes.Transparent,
                PointGeometry   = null
            });
            return(seriesCollection);
        }
예제 #2
0
        public override SeriesCollection GeneerateSeries()
        {
            //      ChartSelect.ChangeToPercents(listCarParks);
            SeriesCollection     seriesCollection = new SeriesCollection();
            ChartValues <double> ts = new ChartValues <double>();
            var aaa = listCarParks.OrderBy(x => x.year).ThenBy(y => y.month);

            listCarParks = aaa.ToList();


            List <IdParking> hlistCarParks = new List <IdParking>();

            hlistCarParks = ChartSelect.ChangeToPercents(listCarParks);


            foreach (var item in hlistCarParks)
            {
                ts.Add(item.count);
            }
            seriesCollection.Add(new ColumnSeries
            {
                Title  = listCarParks[0].name,
                Values = ts
            });
            GenerateTable();
            return(seriesCollection);
        }