123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- <UserControl x:Class="Aitex.UI.Charting.View.RunTimeStatisticView"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:sciChart="http://schemas.abtsoftware.co.uk/scichart"
- mc:Ignorable="d"
- d:DesignHeight="408" d:DesignWidth="880" FontFamily="Arial,SimSun" FontSize="11">
- <Grid x:Name="grid1">
- <Grid.RowDefinitions>
- <RowDefinition Height="auto" />
- <RowDefinition Height="400*" />
- </Grid.RowDefinitions>
- <StackPanel Grid.Row="0" Height="22" Orientation="Horizontal" Background="LightGray">
- <Button Width="75" BorderThickness="0.1" Padding="0" IsTabStop="False" Focusable="False" Command="{Binding Show1YearCommand}"
- ToolTip="查看最近一年的设备运行情况">
- <Button.Content>
- <StackPanel Orientation="Horizontal">
- <Image Source="/DataAnalysisControl;component/Charting/Images/Zoom_All.png" Stretch="Fill" Height="19" Width="19" HorizontalAlignment="Left" />
- <Label Content=" 最近一年" VerticalContentAlignment="Center" Padding="0" />
- </StackPanel>
- </Button.Content>
- </Button>
- <Button Width="75" BorderThickness="0.1" Padding="0" IsTabStop="False" Focusable="False" Command="{Binding ShowAllCommand}"
- ToolTip="查看全部时间段的设备运行情况">
- <Button.Content>
- <StackPanel Orientation="Horizontal">
- <Image Source="/DataAnalysisControl;component/Charting/Images/Zoom_All.png" Stretch="Fill" Height="19" Width="19" HorizontalAlignment="Left" />
- <Label Content=" 全部时间" VerticalContentAlignment="Center" Padding="0" />
- </StackPanel>
- </Button.Content>
- </Button>
- </StackPanel>
- <Grid Grid.Row="1">
- <!-- Create the chart surface -->
- <sciChart:SciChartSurface Name="sciChart" sciChart:ThemeManager.Theme="BrightSpark" ClipToBounds="False" Padding="0">
- <!-- Declare RenderableSeries -->
- <sciChart:SciChartSurface.RenderableSeries>
- <sciChart:FastBandRenderableSeries SeriesColor="#55FF0000" Series1Color="#55FF0000" BandUpColor="#55FF0000" BandDownColor="#55FF0000" IsDigitalLine="False"/>
- <sciChart:FastBandRenderableSeries SeriesColor="#5500FF00" Series1Color="#5500FF00" BandUpColor="#5500FF00" BandDownColor="#5500FF00" IsDigitalLine="False"/>
- <sciChart:FastBandRenderableSeries SeriesColor="#555F5F00" Series1Color="#555F5F00" BandUpColor="#555F5F00" BandDownColor="#555F5F00" IsDigitalLine="False"/>
- <sciChart:FastBandRenderableSeries SeriesColor="#550000FF" Series1Color="#550000FF" BandUpColor="#550000FF" BandDownColor="#550000FF" IsDigitalLine="False"/>
- </sciChart:SciChartSurface.RenderableSeries>
- <!--
- <sciChart:SciChartSurface.RenderableSeries>
- <sciChart:FastLineRenderableSeries SeriesColor="Red">
- <sciChart:FastLineRenderableSeries.PointMarkerTemplate>
- <ControlTemplate>
- <Ellipse Width="8" Height="8" Fill="Red"/>
- </ControlTemplate>
- </sciChart:FastLineRenderableSeries.PointMarkerTemplate>
- </sciChart:FastLineRenderableSeries>
- <sciChart:FastLineRenderableSeries SeriesColor="DarkBlue">
- <sciChart:FastLineRenderableSeries.PointMarkerTemplate>
- <ControlTemplate>
- <Ellipse Width="8" Height="8" Fill="DarkBlue"/>
- </ControlTemplate>
- </sciChart:FastLineRenderableSeries.PointMarkerTemplate>
- </sciChart:FastLineRenderableSeries>
- <sciChart:FastLineRenderableSeries SeriesColor="DarkOrange">
- <sciChart:FastLineRenderableSeries.PointMarkerTemplate>
- <ControlTemplate>
- <Ellipse Width="8" Height="8" Fill="DarkOrange"/>
- </ControlTemplate>
- </sciChart:FastLineRenderableSeries.PointMarkerTemplate>
- </sciChart:FastLineRenderableSeries>
- <sciChart:FastLineRenderableSeries SeriesColor="DarkGreen">
- <sciChart:FastLineRenderableSeries.PointMarkerTemplate>
- <ControlTemplate>
- <Ellipse Width="8" Height="8" Fill="DarkGreen"/>
- </ControlTemplate>
- </sciChart:FastLineRenderableSeries.PointMarkerTemplate>
- </sciChart:FastLineRenderableSeries>
- </sciChart:SciChartSurface.RenderableSeries>
- -->
- <!-- Create an X Axis -->
- <sciChart:SciChartSurface.XAxis>
- <sciChart:DateTimeAxis AutoRange="Never" DrawMinorTicks="True" DrawMinorGridLines="True" Margin="0,0,0,0" SubDayTextFormatting="yyyy/MM/dd" TitleFontSize="10" TextFormatting="yyyy/MM/dd" AxisTitle="日期" MinorsPerMajor="1" />
- </sciChart:SciChartSurface.XAxis>
- <!-- Create a Y Axis -->
- <sciChart:SciChartSurface.YAxis>
- <sciChart:NumericAxis DrawMinorTicks="True" DrawMinorGridLines="True" AxisAlignment="Right" AxisTitle="运行时间 (小时)" MinorsPerMajor="1">
- <sciChart:NumericAxis.GrowBy>
- <sciChart:DoubleRange Min="0.1" Max="0.1"/>
- </sciChart:NumericAxis.GrowBy>
- </sciChart:NumericAxis>
- </sciChart:SciChartSurface.YAxis>
- <!-- Specify interactivity modifiers -->
- <sciChart:SciChartSurface.ChartModifier>
- <sciChart:ModifierGroup>
- <!-- Provides selection of series and custom styling to the selected series -->
- <sciChart:SeriesSelectionModifier>
- <sciChart:SeriesSelectionModifier.SelectedSeriesStyle>
- <Style TargetType="sciChart:BaseRenderableSeries">
- <Setter Property="SeriesColor" Value="Red"/>
- <Setter Property="PointMarkerTemplate">
- <Setter.Value>
- <ControlTemplate>
- <Ellipse Fill="#FFAA00AA" Stroke="Red" Width="8" Height="8"/>
- </ControlTemplate>
- </Setter.Value>
- </Setter>
- </Style>
- </sciChart:SeriesSelectionModifier.SelectedSeriesStyle>
- </sciChart:SeriesSelectionModifier>
- <sciChart:RubberBandXyZoomModifier IsEnabled="True"
- IsXAxisOnly="True"
- ZoomExtentsY="False"
- IsAnimated="True" ExecuteOn="MouseMiddleButton" />
- <sciChart:ZoomExtentsModifier ExecuteOn="MouseDoubleClick"/>
- <!-- Provides a data source for the legend control -->
- <sciChart:LegendModifier GetLegendDataFor="AllSeries" x:Name="legendModifier"/>
- <!--<sciChart:RubberBandXyZoomModifier IsEnabled="True" IsXAxisOnly="True"/>-->
- <!--<sciChart:CursorModifier IsEnabled="True"
- ShowAxisLabels="True"
- ShowTooltip="True" />-->
- <sciChart:ZoomPanModifier IsEnabled="True" ExecuteOn="MouseRightButton" XyDirection="XDirection" ZoomExtentsY="False" />
- <sciChart:MouseWheelZoomModifier XyDirection="XDirection"/>
- </sciChart:ModifierGroup>
- </sciChart:SciChartSurface.ChartModifier>
- </sciChart:SciChartSurface>
- <sciChart:SciChartLegend x:Name="legendControl" Visibility="Visible"
- Grid.Row="0" Margin="5,5" ShowVisibilityCheckboxes="True"
- LegendData="{Binding LegendData, ElementName=legendModifier, Mode=OneWay}"
- FontSize="10" FontWeight="Light" />
-
- </Grid>
- </Grid>
- </UserControl>
|