when a part of the graph has a value less than or equal to 3 on the label the word "other" appears and not the value that should appear in this case "value 3%" someone could help me so that I can show the value of " 3% "and not the value of others.
example in code:
p_MontoTotalDirecta = 40; p_MontoTotalRestringida = 40; p_MontoTotalLicitaAbierta = 17; p_MontoAdjudicadoTotal = 3;
ChartModel.Add(new PieChart() { Label = p_MontoTotalDirecta + "%", Value = p_MontoTotalDirecta }); Brushes.Add(new SolidColorBrush(Color.FromHex("#e6219b")));//rosado ChartModel.Add(new PieChart() { Label = p_MontoTotalRestringida + "%", Value = p_MontoTotalRestringida }); Brushes.Add(new SolidColorBrush(Color.FromHex("#f7b142")));//naranja ChartModel.Add(new PieChart() { Label = p_MontoTotalLicitaAbierta + "%", Value = p_MontoTotalLicitaAbierta }); Brushes.Add(new SolidColorBrush(Color.FromHex("#632f94")));//morado ChartModel.Add(new PieChart() { Label = p_MontoAdjudicadoTotal + "%", Value = p_MontoAdjudicadoTotal }); Brushes.Add(new SolidColorBrush(Color.FromHex("#3fa93d")));//verde
Hello Rafael,
There are a couple of ways that you can show your "3%" label instead of showing "Others" in this case.
The simplest way with the sample data that you have provided would be to set the OthersCategoryThreshold property of the XamPieChart to zero. This would essentially disable the "others" slice, showing your label instead.
The alternative in this case would be to set the OthersCategoryText property, as if you had multiple very small categories in this case that you would like to see represented as a single "Others" slice, you could add up the percentages that they make up and set this property to that value.
Please let me know if you have any other questions or concerns on this matter.
thanks, it worked very well