public void UpdateTagChartData() { if (Operations != null) { TagChartData = VMUtils.GetTagsRepartition(Operations, _compareDate);// data; } }
private void UpdateTagDepenses(DateTime compareDate) { if (Accounts == null) { return; } var operations = Accounts.Where(x => x.Operations != null).SelectMany(x => x.Operations); TagDepenses = VMUtils.GetTagsRepartition(operations, compareDate); //var data = operations // .Where(x=>!String.IsNullOrWhiteSpace(x.TagName)) // .Where(x => x.Amount < 0) // .Where(x => x.Date.CompareTo(compareDate) > 0) // .GroupBy(x => x.TagName) // .ToDictionary(x => x.Key, x => Math.Abs(x.Sum(y => y.Amount))); //TagDepenses = data; }