Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
149 lines (123 sloc) 9.29 KB
<UserControl x:Class="SciChart.Examples.Examples.PerformanceDemos2D.ScatterPerf.ScatterChartPerformanceTest"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:s="http://schemas.abtsoftware.co.uk/scichart"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:ext="http://schemas.abtsoftware.co.uk/scichart/exampleExternals"
d:DesignHeight="400"
d:DesignWidth="600"
mc:Ignorable="d">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- The SciChartInteractionToolbar adds zoom, pan, zoom extents and rotate functionality -->
<!-- to the chart and is included for example purposes. -->
<!-- If you wish to know how to zoom and pan a chart then do a search for Zoom Pan in the Examples suite! -->
<ext:SciChartInteractionToolbar TargetSurface="{Binding Source={x:Reference Name=sciChart}}" >
<ext:FlyoutMenuButton Style="{StaticResource FlyoutMenuButtonStyle}" Content="PM" Padding="0">
<ext:FlyoutMenuButton.PopupContent>
<StackPanel Orientation="Vertical" MinWidth="150" Margin="0,0,0,4">
<TextBlock Text="Point Markers" />
<ext:FlyoutSeparator/>
<CheckBox x:Name="ChkEllipse" Margin="4" Content="Ellipse" IsChecked="True" Foreground="#999" s:ToggleButtonExtensions.GroupName="SelectPointMarkersGroup"/>
<CheckBox x:Name="ChkTriangle" Margin="4" Content="Triangle" IsChecked="False" Foreground="#999" s:ToggleButtonExtensions.GroupName="SelectPointMarkersGroup"/>
<CheckBox x:Name="ChkTriangleInverse" Margin="4" Content="Inverted Triangle" IsChecked="False" Foreground="#999" s:ToggleButtonExtensions.GroupName="SelectPointMarkersGroup"/>
<CheckBox x:Name="ChkSquare" Margin="4" Content="Square" IsChecked="False" Foreground="#999" s:ToggleButtonExtensions.GroupName="SelectPointMarkersGroup"/>
<CheckBox x:Name="ChkCross" Margin="4" Content="Cross" IsChecked="False" Foreground="#999" s:ToggleButtonExtensions.GroupName="SelectPointMarkersGroup"/>
<CheckBox x:Name="ChkX" Margin="4" Content="X" IsChecked="False" Foreground="#999" s:ToggleButtonExtensions.GroupName="SelectPointMarkersGroup"/>
<CheckBox x:Name="ChkSprite" Margin="4" Content="Sprite (Custom)" IsChecked="False" Foreground="#999" s:ToggleButtonExtensions.GroupName="SelectPointMarkersGroup"/>
</StackPanel>
</ext:FlyoutMenuButton.PopupContent>
</ext:FlyoutMenuButton>
</ext:SciChartInteractionToolbar>
<s:SciChartSurface x:Name="sciChart" Grid.Column="1">
<s:SciChartSurface.RenderableSeries>
<s:XyScatterRenderableSeries x:Name="ellipseScatterSeries" Stroke="CornflowerBlue" IsVisible="{Binding Source={x:Reference Name=ChkEllipse}, Path=IsChecked, Mode=TwoWay}">
<s:XyScatterRenderableSeries.PointMarker>
<s:EllipsePointMarker Width="5" Height="5"/>
</s:XyScatterRenderableSeries.PointMarker>
</s:XyScatterRenderableSeries>
<s:XyScatterRenderableSeries x:Name="crossScatterSeries" Stroke="BlueViolet" IsVisible="{Binding Source={x:Reference Name=ChkCross}, Path=IsChecked, Mode=TwoWay}">
<s:XyScatterRenderableSeries.PointMarker>
<s:CrossPointMarker Width="5" Height="5"/>
</s:XyScatterRenderableSeries.PointMarker>
</s:XyScatterRenderableSeries>
<s:XyScatterRenderableSeries x:Name="xScatterSeries" Stroke="DarkGray" IsVisible="{Binding Source={x:Reference Name=ChkX}, Path=IsChecked, Mode=TwoWay}">
<s:XyScatterRenderableSeries.PointMarker>
<s:XPointMarker Width="5" Height="5"/>
</s:XyScatterRenderableSeries.PointMarker>
</s:XyScatterRenderableSeries>
<s:XyScatterRenderableSeries x:Name="squareScatterSeries" Stroke="DarkOrange" IsVisible="{Binding Source={x:Reference Name=ChkSquare}, Path=IsChecked, Mode=TwoWay}">
<s:XyScatterRenderableSeries.PointMarker>
<s:SquarePointMarker Width="5" Height="5"/>
</s:XyScatterRenderableSeries.PointMarker>
</s:XyScatterRenderableSeries>
<s:XyScatterRenderableSeries x:Name="triangleScatterSeries" Stroke="Crimson" IsVisible="{Binding Source={x:Reference Name=ChkTriangle}, Path=IsChecked, Mode=TwoWay}">
<s:XyScatterRenderableSeries.PointMarker>
<s:TrianglePointMarker Width="5" Height="5"/>
</s:XyScatterRenderableSeries.PointMarker>
</s:XyScatterRenderableSeries>
<s:XyScatterRenderableSeries x:Name="triangleInvScatterSeries" Stroke="Coral" IsVisible="{Binding Source={x:Reference Name=ChkTriangleInverse}, Path=IsChecked, Mode=TwoWay}">
<s:XyScatterRenderableSeries.PointMarker>
<s:InvertedTrianglePointMarker Width="5" Height="5"/>
</s:XyScatterRenderableSeries.PointMarker>
</s:XyScatterRenderableSeries>
<s:XyScatterRenderableSeries x:Name="spriteScatterSeries" IsVisible="{Binding Source={x:Reference Name=ChkSprite}, Path=IsChecked, Mode=TwoWay}">
<s:XyScatterRenderableSeries.PointMarker>
<s:SpritePointMarker>
<s:SpritePointMarker.PointMarkerTemplate>
<ControlTemplate>
<!-- Custom pointmarker rendering an asterisk style using Canvas + Line -->
<Canvas Width="7" Height="7">
<Line StrokeThickness="1" Stroke="LimeGreen" X1="0" X2="7" Y1="0" Y2="7"/>
<Line StrokeThickness="1" Stroke="LimeGreen" X1="0" X2="7" Y1="7" Y2="0"/>
<Line StrokeThickness="1" Stroke="LimeGreen" X1="3.5" X2="3.5" Y1="7" Y2="0"/>
<Line StrokeThickness="1" Stroke="LimeGreen" X1="0" X2="7" Y1="3.5" Y2="3.5"/>
</Canvas>
</ControlTemplate>
</s:SpritePointMarker.PointMarkerTemplate>
</s:SpritePointMarker>
</s:XyScatterRenderableSeries.PointMarker>
</s:XyScatterRenderableSeries>
</s:SciChartSurface.RenderableSeries>
<s:SciChartSurface.XAxis>
<s:NumericAxis VisibleRange="0,1" GrowBy="0.2,0.2"/>
</s:SciChartSurface.XAxis>
<s:SciChartSurface.YAxis>
<s:NumericAxis VisibleRange="-1,1" GrowBy="0.15,0.4"/>
</s:SciChartSurface.YAxis>
<s:SciChartSurface.ChartModifier>
<s:ModifierGroup>
<s:MouseWheelZoomModifier/>
</s:ModifierGroup>
</s:SciChartSurface.ChartModifier>
<s:SciChartSurface.Annotations>
<s:CustomAnnotation CoordinateMode="Relative"
HorizontalAnchorPoint="Left"
VerticalAnchorPoint="Center"
Margin="5,120,0,0"
X1="0"
Y1="0" >
<StackPanel Orientation="Horizontal">
<TextBlock FontSize="20"
Opacity="0.7"
Background="#232323"
Margin="0 0 5 0"
Text="To change Point-Marker Type click"
Foreground="#FFF" />
<Image Width="32"
Height="32"
Source="/SciChart.Examples;component/Resources/Images/point_marker_icon.png"
Stretch="None" />
</StackPanel>
</s:CustomAnnotation>
<!-- <s:TextAnnotation CoordinateMode="Relative" Foreground="White" Margin="5,70,0,0" FontSize="20" Text="To change Point-Marker Type click" HorizontalAnchorPoint="Left" VerticalAnchorPoint="Center" Opacity="0.9" />-->
<s:TextAnnotation CoordinateMode="Relative" X1="0.5" Y1="0.85" Foreground="White" FontSize="16" Text="Zoom In and Out to feel the speeeed!" HorizontalAnchorPoint="Center" VerticalAnchorPoint="Center" Opacity="0.9"></s:TextAnnotation>
</s:SciChartSurface.Annotations>
</s:SciChartSurface>
<s:SciChartPerformanceOverlay TargetSurface="{Binding Source={x:Reference Name=sciChart}}" Margin="5" VerticalAlignment="Top" IsHitTestVisible="False" Grid.Column="1"/>
</Grid>
</UserControl>
You can’t perform that action at this time.