using System;
using System.Collections.Generic;
using System.Windows;
using Telerik.Windows.Controls.Charting;
using Telerik.Windows.Controls;
using System.Windows.Data;

namespace WpfApplication1
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class MainWindow : Window
    {
        public MainWindow()
        {
            InitializeComponent();

            DataSeries series = new DataSeries();
            series.Definition = new CandleStickSeriesDefinition();
            series.Add(new DataPoint() { Open = 10, Close = 40, High = 60, Low = 10, XValue = DateTime.Today.ToOADate() });
            series.Add(new DataPoint() { Open = 40, Close = 50, High = 60, Low = 30, XValue = DateTime.Today.AddDays(1).ToOADate() });
            series.Add(new DataPoint() { Open = 50, Close = 60, High = 60, Low = 50, XValue = DateTime.Today.AddDays(2).ToOADate() });
            series.Add(new DataPoint() { Open = 60, Close = 10, High = 65, Low = 10, XValue = DateTime.Today.AddDays(3).ToOADate() });

            RadChart1.DefaultView.ChartArea.DataSeries.Add(series);
        }
    }
}
