Example #1
0
        public HistoryByShopVM()
        {
            NumberOfMounths  = "5";
            HistoryByShopM   = new HistoryByShopM();
            ShopList         = new ObservableCollection <string>(HistoryByShopM.GetShops().OrderBy(x => x));
            NumOfMonthsList  = new ObservableCollection <string>(new Tools.MonthsListTool().GetNumOfMonthsList());
            SeriesCollection = new SeriesCollection();

            Labels     = new Tools.GetMounthsLabels().GetLabels(int.Parse(NumberOfMounths));
            YFormatter = value => value.ToString("C");
        }
Example #2
0
        public void updateGraph(string ShopName)
        {
            foreach (var line in seriesCollection)
            {
                if (line.Title == ShopName)
                {
                    seriesCollection.Remove(line);
                    return;
                }
            }

            SeriesCollection.Add
                (new LineSeries
            {
                Title             = ShopName,
                Values            = new ChartValues <double>(HistoryByShopM.GetHistoryByShop(ShopName, Labels)),
                PointGeometry     = DefaultGeometries.Circle,
                PointGeometrySize = 15
            });
        }