|
5 | 5 | xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
6 | 6 | xmlns:local="clr-namespace:MostActiveVolcanoes"
|
7 | 7 | xmlns:chart="clr-namespace:Syncfusion.UI.Xaml.Charts;assembly=Syncfusion.SfChart.WPF"
|
8 |
| - mc:Ignorable="d" |
9 |
| - Title="MainWindow" Height="450" Width="800"> |
10 |
| - |
| 8 | + mc:Ignorable="d"> |
| 9 | + |
11 | 10 | <Grid>
|
12 | 11 | <Grid.DataContext>
|
13 | 12 | <local:VolcanoesData x:Name="viewModel"/>
|
14 |
| - </Grid.DataContext> |
| 13 | + </Grid.DataContext> |
15 | 14 |
|
16 | 15 | <Border Margin="30" Padding="10" BorderThickness="1.5" CornerRadius="10" BorderBrush="#8d8794">
|
17 | 16 | <chart:SfChart>
|
18 | 17 |
|
19 | 18 | <chart:SfChart.Resources>
|
20 |
| - <local:CountryCodeToNameConverter x:Key="CountryCodeConverter"/> |
| 19 | + <local:CountryCodeToNameConverter x:Key="CountryCodeConverter"/> |
21 | 20 |
|
22 | 21 | <Geometry x:Key="PathData">M76.6454 39.9309C103.228 13.5478 116.52 0.356277 133 0.356277C149.48 0.356277 162.772 13.5478 189.355 39.931L266 116H0L76.6454 39.9309Z</Geometry>
|
23 | 22 | <Geometry x:Key="PathData1">M52,0 C49.2,0 46.7,1.9 45.6,4.5 L45,4.5 C42.4,4.5 40.3,6.5 40,9.1 C38.1,9.6 36.6,11.5 36.6,13.7 C36.6,14.2 36.7,14.6 36.8,15 L36.6,15 C35.3,15 34.2,16.1 34.2,17.5 C34.2,18.9 35.3,20 36.6,20 C37.8,20 38.8,19 39,17.8 C39.6,18.2 40.4,18.4 41.2,18.4 C43,18.4 44.5,17.3 45.3,15.8 C46,16.3 46.9,16.6 47.9,16.6 C49.7,16.6 51.2,15.5 51.9,14 C56,13.8 59.1,11.3 59.1,7.5 C59,3.4 55.8,0 52,0 L52,0 Z</Geometry>
|
24 | 23 | <Geometry x:Key="PathData2">M58.6,61 L37.4,24 L31,24 L19.5,44.1 L14.4,37.2 L-0.5,61 L58.6,61 Z</Geometry>
|
25 | 24 | <Geometry x:Key="PathData3">M43.1,35.5 L39.1,40.2 L34.2,37.2 L30.2,40.2 L25.3,35.2</Geometry>
|
26 | 25 |
|
27 | 26 | <DataTemplate x:Key="seriesTemplate">
|
28 |
| - <Canvas> |
| 27 | + <Canvas> |
29 | 28 | <Path Canvas.Left="{Binding RectX}" Canvas.Top="{Binding RectY}" Width="{Binding Width}" Height="{Binding Height}"
|
30 |
| - Fill="{Binding Interior}" Stretch="Fill" Data="{StaticResource PathData}"> |
31 |
| - </Path> |
32 |
| - </Canvas> |
33 |
| - </DataTemplate> |
| 29 | + Fill="{Binding Interior}" Stretch="Fill" Data="{StaticResource PathData}"> |
| 30 | + </Path> |
| 31 | + </Canvas> |
| 32 | + </DataTemplate> |
34 | 33 | </chart:SfChart.Resources>
|
35 | 34 |
|
36 | 35 | <chart:SfChart.Header>
|
|
46 | 45 | </chart:SfChart.SecondaryAxis>
|
47 | 46 |
|
48 | 47 | <chart:ColumnSeries ItemsSource="{Binding Data}" XBindingPath="Country" YBindingPath="Count"
|
49 |
| - CustomTemplate="{StaticResource seriesTemplate}" Interior="#FF6600" |
50 |
| - SegmentSelectionBrush="#6BFF6600" SelectedIndex="{Binding SelectedIndex, Mode=TwoWay}"> |
| 48 | + CustomTemplate="{StaticResource seriesTemplate}" Interior="#FF6600" |
| 49 | + SegmentSelectionBrush="#6BFF6600" SelectedIndex="{Binding SelectedIndex, Mode=TwoWay}"> |
51 | 50 | </chart:ColumnSeries>
|
52 | 51 |
|
53 | 52 | <chart:SfChart.Behaviors>
|
|
68 | 67 | <RowDefinition Height="Auto"/>
|
69 | 68 | <RowDefinition Height="Auto"/>
|
70 | 69 | </Grid.RowDefinitions>
|
71 |
| - |
| 70 | + |
72 | 71 | <Grid Grid.Row="0" Grid.Column="0">
|
73 | 72 | <Path Data="{StaticResource PathData1}" Fill="#FF6600"/>
|
74 | 73 | <Path Data="{StaticResource PathData2}" Fill="#FF6600"/>
|
75 | 74 | <Path Data="{StaticResource PathData3}" Fill="#FF6600"/>
|
76 | 75 | </Grid>
|
77 |
| - |
| 76 | + |
78 | 77 | <StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal" VerticalAlignment="Center" Margin="5,20,0,0" Width="100">
|
79 | 78 | <TextBlock Text="{Binding Country, Converter={StaticResource CountryCodeConverter}}" FontWeight="SemiBold" FontSize="12.5"/>
|
80 | 79 | <TextBlock Text="{Binding Count, StringFormat=' : {0}'}" FontWeight="SemiBold" FontSize="12.5"/>
|
|
94 | 93 | </chart:SfChart>
|
95 | 94 | </Border>
|
96 | 95 | </Grid>
|
| 96 | + |
97 | 97 | </Window>
|
0 commit comments