예제 #1
0
 public Details(Model.CostList costs, Settings config)
 {
     InitializeComponent();
     Costs                = costs;
     Config               = config;
     this.DataContext     = Config.LanguageSet;
     SAll.DataContext     = costs;
     Name.DataContext     = costs;
     ShowYear.DataContext = Config;
     UpdateDetailChart(costs);
 }
예제 #2
0
        void UpdateDetailChart(Model.CostList costs)
        {
            Cartesian.Series.Clear();
            int i    = 0;
            var cost = costs.List.Where(e => e.Date.Year == Config.ChoosedYearDetails);

            foreach (var a in cost)
            {
                double[] ab = new double[12];
                ab[a.Date.Month - 1] = a.Price;
                var c = new ChartValues <double>(ab);
                Cartesian.Series.Add(new StackedColumnSeries()
                {
                    Values = c, Title = a.Name, DataLabels = true,
                });
            }

            i++;
        }