using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Windows.Foundation;
using Windows.Foundation.Collections;
using Windows.UI.Xaml;
using Windows.UI.Xaml.Controls;
using Windows.UI.Xaml.Controls.Primitives;
using Windows.UI.Xaml.Data;
using Windows.UI.Xaml.Input;
using Windows.UI.Xaml.Media;
using Windows.UI.Xaml.Navigation;
using C1.Xaml.Chart;

// The User Control item template is documented at http://go.microsoft.com/fwlink/?LinkId=234236

namespace TileViewSamples
{
    public sealed partial class SalesPerAgents : UserControl
    {
        public Palette Palette
        {
            get
            {
                return salesPieChart.Palette;
            }
            set
            {
                salesPieChart.Palette = value;
            }
        }

        public SalesPerAgents()
        {
            this.InitializeComponent();

            salesPieChart.Data.ItemNames = "Harnpadoungsataya Hunter Johnson Wright Northup".Split(' ');
            Helper.AddChartSeries(salesPieChart, "5892 2300 3412 976 400", null);
            C1ChartLegend legend = new C1ChartLegend() 
            {
                FontSize = 11,
                HorizontalAlignment = HorizontalAlignment.Stretch,
                VerticalAlignment =VerticalAlignment.Stretch,
                Height = 152,
                Width = 165
            };
            Grid.SetRow(legend, 1);
            salesPieChart.Children.Add(legend);
        }
    }
}
