<UserControl x:Class="UIDesign.Controls.Charts.ChartsView"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:local="clr-namespace:UIDesign.Controls.Charts"
      xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      mc:Ignorable="d">
    
    <WrapPanel>
        <StackPanel Orientation="Horizontal" Margin="50">
            <Grid>
                <Grid.Resources/>

                <StackPanel Orientation="Horizontal">
                    <Grid>
                        <telerik:RadCartesianChart x:Name="chart"
                                                   Width="200" Height="160"
                                                   Margin="10">
                            <telerik:RadCartesianChart.HorizontalAxis>
                                <telerik:CategoricalAxis/>
                            </telerik:RadCartesianChart.HorizontalAxis>
                            <telerik:RadCartesianChart.VerticalAxis>
                                <telerik:LinearAxis/>
                            </telerik:RadCartesianChart.VerticalAxis>
                            <telerik:RadCartesianChart.Series>
                                <telerik:BarSeries ItemsSource="{Binding ItemsSource1}"
                                                   CategoryBinding="XCat" ValueBinding="YVal1">
                                </telerik:BarSeries>
                            </telerik:RadCartesianChart.Series>
                        </telerik:RadCartesianChart>
                        <telerik:RadLegend BorderBrush="Black" BorderThickness="1"
                                           HorizontalAlignment="Right" VerticalAlignment="Top"
                                           Items="{Binding LegendItems, ElementName=chart}"/>
                    </Grid>
                </StackPanel>
            </Grid>
        </StackPanel>
    </WrapPanel>
</UserControl>
