using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using Telerik.Windows.Controls;

namespace WpfChartExample
{
    class MainWindowVm : ViewModelBase
    {
        private ObservableCollection<Datapoint> mData;
        public ObservableCollection<Datapoint> Data
        {
            get { return mData; }
            set { mData = value; RaisePropertyChanged(); }
        }

        public MainWindowVm()
        {
            Data = new ObservableCollection<Datapoint>();

            List<Datapoint> list = new List<Datapoint>();
            for (int i = 0; i < 1000; i++)
            {
                list.Add(new Datapoint
                {
                    Timestmp = DateTime.Now.AddSeconds(i),
                    Value = i,
                    ValueLow = i - 100,
                    ValueHigh = i + 100
                });
            }

            Data = new ObservableCollection<Datapoint>(list);
        }
    }

    public class Datapoint
    {
        public DateTime Timestmp { get; set; }
        public object Value { get; set; }
        public object ValueLow { get; set; }
        public object ValueHigh { get; set; }
    }
}
