Ejemplo n.º 1
0
        private void OnStatisticItemsListSelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            if (e.AddedItems.Count != 1)
            {
                return;
            }

            var item   = (Label)e.AddedItems[0];
            var itemId = (int)item.Tag;

            var statisticDataPoints = databaseController.GetPointsForActivity(itemId);

            SeriesCollection[0].Values = new ChartValues <int>(statisticDataPoints.Select(dataPoint => dataPoint.Count));
            SeriesCollection[1].Values = new ChartValues <int>(statisticDataPoints.Select(dataPoint => dataPoint.In));
            SeriesCollection[2].Values = new ChartValues <int>(statisticDataPoints.Select(dataPoint => dataPoint.Out));
        }