Skip to content

Commit a8382a7

Browse files
committed
update use case for legend maximum sizerequest
1 parent 070d557 commit a8382a7

File tree

3 files changed

+78
-67
lines changed

3 files changed

+78
-67
lines changed

LegendSample/LegendSample/View/LegendMaximumSizeSample.xaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@
2121
</chart:SfCircularChart.Title>
2222

2323
<chart:SfCircularChart.Legend>
24-
<local:LegendExt>
24+
<local:LegendExt Placement="Bottom">
25+
<local:LegendExt.ItemsLayout>
26+
<FlexLayout Wrap="Wrap" WidthRequest="600">
27+
</FlexLayout>
28+
</local:LegendExt.ItemsLayout>
2529
</local:LegendExt>
2630
</chart:SfCircularChart.Legend>
2731

LegendSample/LegendSample/ViewModel/ViewModel.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,16 @@ public ViewModel()
5151
new DataModel("Pakistan", 3600),
5252
new DataModel("US", 2125),
5353
new DataModel("Argentina", 400),
54-
new DataModel("Australia", 275),
55-
new DataModel("Brazil", 1100),
54+
new DataModel("Australia",275 ),
55+
new DataModel("Brazil",1100 ),
56+
new DataModel("Burma", 1850),
5657
new DataModel("Cambodia", 1800),
57-
new DataModel("China", 1800),
58+
new DataModel("China",1800 ),
59+
new DataModel("European Union", 400),
60+
new DataModel("Guyana", 440),
61+
new DataModel("Paraguay", 820),
62+
new DataModel("Turkey",240 ),
63+
new DataModel("Uruguay", 900),
5864
new DataModel("Others", 1398),
5965
};
6066

@@ -68,7 +74,7 @@ public class LegendExt : ChartLegend
6874
// Override the GetMaximumSizeCoefficient method to customize the legend size
6975
protected override double GetMaximumSizeCoefficient()
7076
{
71-
return 0.2;
77+
return 0.9;
7278
}
7379
}
7480
}

0 commit comments

Comments
 (0)