using BaseRadChartViewProject.Models;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Media;
using Telerik.Windows.Controls.ChartView;

namespace BaseRadChartViewProject.ViewModels
{
    public class MainViewModel
    {
        public MainViewModel()
        {
            var firstSeriesBrush =  new SolidColorBrush(Color.FromArgb(0xFF, 0xFF, 0xE4, 0xC4));
            var secondSeriesBrush = new SolidColorBrush(Color.FromArgb(0xFF, 0x80, 0x80, 0x00));

            Random r = new Random();

            this.FirstItemsCollection = new ObservableCollection<DataItem>()
            {
                new DataItem {Category = "1", Value =r.Next(5, 30), Fill = firstSeriesBrush} ,
                new DataItem {Category = "1", Value =r.Next(5, 30), Fill = secondSeriesBrush},
                new DataItem {Category = "2", Value =r.Next(5, 30), Fill = firstSeriesBrush},
                new DataItem {Category = "2", Value =r.Next(5, 30), Fill = secondSeriesBrush},
                new DataItem {Category = "3", Value =r.Next(5, 30), Fill = firstSeriesBrush},
                new DataItem {Category = "3", Value =r.Next(5, 30), Fill = secondSeriesBrush},
                new DataItem {Category = "4", Value =r.Next(5, 30), Fill = firstSeriesBrush},
                new DataItem {Category = "4", Value =r.Next(5, 30), Fill = secondSeriesBrush},
            };

            this.SecondItemsCollection = new ObservableCollection<DataItem>()
            {
                new DataItem {Category = "1", Value =r.Next(5, 30) , Fill = firstSeriesBrush} ,
                new DataItem {Category = "1", Value =r.Next(5, 30) , Fill = secondSeriesBrush} 
            };

        }

        public ObservableCollection<DataItem> FirstItemsCollection { get; set; }
        public ObservableCollection<DataItem> SecondItemsCollection { get; set; }
    }
}
