-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Expand file tree
/
Copy pathCategoryChart.xaml
More file actions
63 lines (61 loc) · 3.54 KB
/
CategoryChart.xaml
File metadata and controls
63 lines (61 loc) · 3.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?xml version="1.0" encoding="utf-8" ?>
<Border xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:chart="clr-namespace:Syncfusion.Maui.Toolkit.Charts;assembly=Syncfusion.Maui.Toolkit"
xmlns:controls="clr-namespace:DeveloperBalance.Pages.Controls"
xmlns:shimmer="clr-namespace:Syncfusion.Maui.Toolkit.Shimmer;assembly=Syncfusion.Maui.Toolkit"
xmlns:pageModels="clr-namespace:DeveloperBalance.PageModels"
x:Class="DeveloperBalance.Pages.Controls.CategoryChart"
HeightRequest="{OnIdiom 300, Phone=200}"
Style="{StaticResource CardStyle}">
<shimmer:SfShimmer
BackgroundColor="Transparent"
VerticalOptions="FillAndExpand"
IsActive ="{Binding IsBusy}">
<shimmer:SfShimmer.CustomView>
<Grid>
<BoxView
CornerRadius="12"
VerticalOptions="FillAndExpand"
Style="{StaticResource ShimmerCustomViewStyle}"/>
</Grid>
</shimmer:SfShimmer.CustomView>
<shimmer:SfShimmer.Content>
<chart:SfCircularChart x:Name="Chart" SemanticProperties.Description="Task Categories Chart">
<chart:DoughnutSeries
ItemsSource="{Binding TodoCategoryData}"
PaletteBrushes="{Binding TodoCategoryColors}"
XBindingPath="Title"
YBindingPath="Count"
ShowDataLabels="True"
EnableTooltip="False"
x:Name="doughnutSeries"
Radius="{OnIdiom 0.6, Phone=0.5}"
InnerRadius="0.7" >
<chart:DoughnutSeries.LabelTemplate>
<DataTemplate >
<HorizontalStackLayout>
<Label Text="{Binding Item.Title}" TextColor="{AppThemeBinding
Light={StaticResource DarkOnLightBackground},
Dark={StaticResource LightOnDarkBackground}}" FontSize="{OnIdiom 18, Phone=14}"/>
<Label Text=" : " TextColor="{AppThemeBinding
Light={StaticResource DarkOnLightBackground},
Dark={StaticResource LightOnDarkBackground}}" FontSize="{OnIdiom 18, Phone=14}"/>
<Label Text="{Binding Item.Count}" TextColor="{AppThemeBinding
Light={StaticResource DarkOnLightBackground},
Dark={StaticResource LightOnDarkBackground}}" FontSize="{OnIdiom 18, Phone=14}"/>
</HorizontalStackLayout>
</DataTemplate>
</chart:DoughnutSeries.LabelTemplate>
<chart:DoughnutSeries.DataLabelSettings>
<chart:CircularDataLabelSettings LabelPosition="Outside" SmartLabelAlignment="Shift">
<chart:CircularDataLabelSettings.ConnectorLineSettings>
<chart:ConnectorLineStyle ConnectorType="Line" StrokeWidth="3" ></chart:ConnectorLineStyle>
</chart:CircularDataLabelSettings.ConnectorLineSettings>
</chart:CircularDataLabelSettings>
</chart:DoughnutSeries.DataLabelSettings>
</chart:DoughnutSeries>
</chart:SfCircularChart>
</shimmer:SfShimmer.Content>
</shimmer:SfShimmer>
</Border>