List <double> GetSelectedPivotValues(PivotGridControl pivot)
        {
            List <double> result = new List <double>();

            foreach (System.Drawing.Point selectedCell in pivot.MultiSelection.SelectedCells)
            {
                result.Add(Convert.ToDouble(pivot.GetCellValue(selectedCell.X, selectedCell.Y)));
            }
            return(result);
        }
        public void UpdateData(PivotGridControl pivot)
        {
            Random        rnd    = new Random();
            List <double> values = GetSelectedPivotValues(pivot);

            MinValue     = values.Min();
            MaxValue     = values.Max();
            AverageValue = values.Average();
            CurrentValue = Convert.ToDouble(pivot.GetCellValue(pivot.FocusedCell.X, pivot.FocusedCell.Y));
            TotalValue   = values.Sum();
            TargetValue  = TotalValue * 1 + TotalValue * 0.3 * ((rnd.NextDouble()));
        }