|
7 | 7 | xmlns:pageModels="clr-namespace:DeveloperBalance.PageModels" |
8 | 8 | x:Class="DeveloperBalance.Pages.Controls.CategoryChart" |
9 | 9 | HeightRequest="{OnIdiom 300, Phone=200}" |
10 | | - Margin="0, 12" |
11 | | - Style="{StaticResource CardStyle}" |
12 | | - x:DataType="pageModels:MainPageModel"> |
| 10 | + Style="{StaticResource CardStyle}"> |
13 | 11 | <shimmer:SfShimmer |
14 | 12 | BackgroundColor="Transparent" |
15 | 13 | VerticalOptions="FillAndExpand" |
16 | 14 | IsActive ="{Binding IsBusy}"> |
17 | 15 | <shimmer:SfShimmer.CustomView> |
18 | 16 | <Grid> |
19 | | - <BoxView |
| 17 | + <BoxView |
20 | 18 | CornerRadius="12" |
21 | 19 | VerticalOptions="FillAndExpand" |
22 | 20 | Style="{StaticResource ShimmerCustomViewStyle}"/> |
23 | 21 | </Grid> |
24 | 22 | </shimmer:SfShimmer.CustomView> |
25 | 23 | <shimmer:SfShimmer.Content> |
26 | 24 | <chart:SfCircularChart x:Name="Chart"> |
27 | | - <chart:SfCircularChart.Legend> |
28 | | - <controls:LegendExt Placement="Right"> |
29 | | - <chart:ChartLegend.LabelStyle> |
30 | | - <chart:ChartLegendLabelStyle |
31 | | - TextColor="{AppThemeBinding |
32 | | - Light={StaticResource DarkOnLightBackground}, |
33 | | - Dark={StaticResource LightOnDarkBackground}}" |
34 | | - Margin="5" |
35 | | - FontSize="18" /> |
36 | | - </chart:ChartLegend.LabelStyle> |
37 | | - </controls:LegendExt> |
38 | | - </chart:SfCircularChart.Legend> |
39 | | - <chart:RadialBarSeries |
| 25 | + <chart:DoughnutSeries |
40 | 26 | ItemsSource="{Binding TodoCategoryData}" |
41 | 27 | PaletteBrushes="{Binding TodoCategoryColors}" |
42 | 28 | XBindingPath="Title" |
43 | | - YBindingPath="Count" |
| 29 | + YBindingPath="Count" |
44 | 30 | ShowDataLabels="True" |
45 | | - EnableTooltip="True" |
46 | | - TrackFill="{AppThemeBinding Light={StaticResource LightBackground}, Dark={StaticResource DarkBackground}}" |
47 | | - CapStyle = "BothCurve"/> |
| 31 | + EnableTooltip="False" |
| 32 | + x:Name="doughnutSeries" |
| 33 | + Radius="{OnIdiom 0.7, Phone=0.5}" |
| 34 | + InnerRadius="0.7" > |
| 35 | + <chart:DoughnutSeries.LabelTemplate> |
| 36 | + <DataTemplate > |
| 37 | + <HorizontalStackLayout> |
| 38 | + <Label Text="{Binding Item.Title}" TextColor="{AppThemeBinding |
| 39 | + Light={StaticResource DarkOnLightBackground}, |
| 40 | + Dark={StaticResource LightOnDarkBackground}}" FontSize="{OnIdiom 18, Phone=14}"/> |
| 41 | + <Label Text=" : " TextColor="{AppThemeBinding |
| 42 | + Light={StaticResource DarkOnLightBackground}, |
| 43 | + Dark={StaticResource LightOnDarkBackground}}" FontSize="{OnIdiom 18, Phone=14}"/> |
| 44 | + <Label Text="{Binding Item.Count}" TextColor="{AppThemeBinding |
| 45 | + Light={StaticResource DarkOnLightBackground}, |
| 46 | + Dark={StaticResource LightOnDarkBackground}}" FontSize="{OnIdiom 18, Phone=14}"/> |
| 47 | + </HorizontalStackLayout> |
| 48 | + </DataTemplate> |
| 49 | + </chart:DoughnutSeries.LabelTemplate> |
| 50 | + |
| 51 | + <chart:DoughnutSeries.DataLabelSettings> |
| 52 | + <chart:CircularDataLabelSettings LabelPosition="Outside" SmartLabelAlignment="Shift"> |
| 53 | + <chart:CircularDataLabelSettings.ConnectorLineSettings> |
| 54 | + <chart:ConnectorLineStyle ConnectorType="Line" StrokeWidth="3" ></chart:ConnectorLineStyle> |
| 55 | + </chart:CircularDataLabelSettings.ConnectorLineSettings> |
| 56 | + </chart:CircularDataLabelSettings> |
| 57 | + </chart:DoughnutSeries.DataLabelSettings> |
| 58 | + </chart:DoughnutSeries> |
| 59 | + |
48 | 60 | </chart:SfCircularChart> |
49 | 61 | </shimmer:SfShimmer.Content> |
50 | 62 | </shimmer:SfShimmer> |
|
0 commit comments