<Window xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  x:Class="ScatterPointWPF.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
        xmlns:telerikChart="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls.Charting"
        xmlns:telerikCharting="clr-namespace:Telerik.Windows.Controls.Charting;assembly=Telerik.Windows.Controls.Charting"
        xmlns:vm="clr-namespace:ScatterPointWPF.ViewModel"
        Title="MainWindow" Height="350" Width="525">
    <Window.DataContext>
        <vm:ScatterViewModel />
    </Window.DataContext>

    <Window.Resources>

        <Style x:Name="Custom" TargetType="telerik:ScatterPoint">
            <Setter Property="Template" >
                <Setter.Value>
                    <ControlTemplate TargetType="telerik:ScatterPoint">
                        <Canvas x:Name="PART_MainContainer">
                            <telerik:PointMark x:Name="PART_PointMark"
                                                   Canvas.Top="{TemplateBinding StartPointY}"
                                                   PointMarkCanvasLeft="{TemplateBinding PointMarkCanvasLeft}"
                                                   PointMarkCanvasTop="{TemplateBinding PointMarkCanvasTop}"
                                                   ShapeStyle="{TemplateBinding PointMarkShapeStyle}" 
                                                   Size="50" />

                        </Canvas>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    
    <Grid>
        <telerik:RadChart x:Name="RadChart1" ItemsSource="{Binding Data}">
            <telerik:RadChart.SeriesMappings>
                <telerik:SeriesMapping CollectionIndex="0">
                    <telerik:SeriesMapping.SeriesDefinition>
                        <telerik:ScatterSeriesDefinition PointShape="Square"/>
                    </telerik:SeriesMapping.SeriesDefinition>
                    <telerik:ItemMapping FieldName="X" DataPointMember="XValue" />
                    <telerik:ItemMapping FieldName="Y" DataPointMember="YValue" />
                </telerik:SeriesMapping>
                <telerik:SeriesMapping CollectionIndex="1">
                    <telerik:SeriesMapping.SeriesDefinition>
                        <telerik:ScatterSeriesDefinition PointShape="Circle" ShowItemToolTips="True"/>
                    </telerik:SeriesMapping.SeriesDefinition>
                    <telerik:ItemMapping FieldName="X" DataPointMember="XValue" />
                    <telerik:ItemMapping FieldName="Y" DataPointMember="YValue" />
                </telerik:SeriesMapping>
                <telerik:SeriesMapping CollectionIndex="2">
                    <telerik:SeriesMapping.SeriesDefinition>
                        <telerik:ScatterSeriesDefinition PointShape="Triangle"/>
                    </telerik:SeriesMapping.SeriesDefinition>
                    <telerik:ItemMapping FieldName="X" DataPointMember="XValue" />
                    <telerik:ItemMapping FieldName="Y" DataPointMember="YValue" />
                </telerik:SeriesMapping>
            </telerik:RadChart.SeriesMappings>

            <telerik:RadChart.DefaultView>
                <telerik:ChartDefaultView>
                    <telerik:ChartDefaultView.ChartLegend>
                        <telerik:ChartLegend Name="legend" />
                    </telerik:ChartDefaultView.ChartLegend>
                    <telerik:ChartDefaultView.ChartArea>
                        <telerik:ChartArea LegendName="legend" ItemToolTipOpening="ChartArea_ItemToolTipOpening">
                            <telerik:ChartArea.AxisX>
                                <telerik:AxisX MajorGridLinesVisibility="Visible" MinorGridLinesVisibility="Visible" />
                            </telerik:ChartArea.AxisX>
                            <telerik:ChartArea.AxisY>
                                <telerik:AxisY StripLinesVisibility="Visible" />
                            </telerik:ChartArea.AxisY>
                        </telerik:ChartArea>
                    </telerik:ChartDefaultView.ChartArea>
                </telerik:ChartDefaultView>
            </telerik:RadChart.DefaultView>
        </telerik:RadChart>
    </Grid>
</Window>
