FlowChart.xaml 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <UserControl x:Class="FastGithub.UI.FlowChart"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:lvc="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
  7. mc:Ignorable="d"
  8. d:DesignHeight="100" d:DesignWidth="300">
  9. <Grid>
  10. <Grid.ColumnDefinitions>
  11. <ColumnDefinition Width=".7*"></ColumnDefinition>
  12. <ColumnDefinition Width=".3*"></ColumnDefinition>
  13. </Grid.ColumnDefinitions>
  14. <Grid.RowDefinitions>
  15. <RowDefinition Height="Auto"></RowDefinition>
  16. <RowDefinition Height="*"></RowDefinition>
  17. </Grid.RowDefinitions>
  18. <lvc:CartesianChart Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="2" Name="flowChart" Series="{Binding Series}" LegendLocation="None" AnimationsSpeed="0:0:1" >
  19. <lvc:CartesianChart.AxisX >
  20. <lvc:Axis Foreground="#222" Unit="1000" LabelFormatter="{Binding XFormatter}">
  21. </lvc:Axis>
  22. </lvc:CartesianChart.AxisX>
  23. <lvc:CartesianChart.AxisY>
  24. <lvc:Axis Foreground="#222" MinValue="0" LabelFormatter="{Binding YFormatter}">
  25. </lvc:Axis>
  26. </lvc:CartesianChart.AxisY>
  27. </lvc:CartesianChart>
  28. <StackPanel Grid.Row="0" Grid.RowSpan="2" Grid.Column="1" VerticalAlignment="Top">
  29. <TextBlock FontSize="12" FontWeight="Light" Foreground="DodgerBlue" HorizontalAlignment="Center" Margin="0 5">上行流量</TextBlock>
  30. <TextBlock x:Name="textBlockRead" Text="0B" Foreground="DodgerBlue" HorizontalAlignment="Center" Margin="0 0 0 8"/>
  31. <TextBlock FontSize="12" FontWeight="Light" Foreground="IndianRed" HorizontalAlignment="Center" Margin="0 5">下行流量</TextBlock>
  32. <TextBlock x:Name="textBlockWrite" Text="0B" Foreground="IndianRed" HorizontalAlignment="Center" Margin="0 0 0 8"/>
  33. </StackPanel>
  34. </Grid>
  35. </UserControl>