Hi,
I'm using Telerik for Winforms 2023.3.1010 on .NET 7.
While trying to configure the position of my label position using PieTwoLabelColumnsStrategy, only the first label seems to be working with DistanceBetweenLabels property.
PieTwoLabelColumnsStrategy strategy = new PieTwoLabelColumnsStrategy()
{
DistanceBetweenLabels = 50,
DistanceToLabel = -100
};
SmartLabelsController smartLabelsController = new SmartLabelsController
{
Strategy = strategy
};
radChartView.Controllers.Add(smartLabelsController);
radChartView.ShowSmartLabels = true;
Here is how I'm filling the chart:
radChartView.AreaType = ChartAreaType.Pie;
radChartView.Series.Clear();
DonutSeries donut = new DonutSeries
{
ShowLabels = true,
LabelMode = PieLabelModes.Horizontal,
DrawLinesToLabels = true,
SyncLinesToLabelsColor = true,
NumberOfColors = categoryCount
};
foreach (var v in totals.OrderByDescending(s => s.Statut))
{
PieDataPoint point = new PieDataPoint(v.Nombre, v.Statut)
{
Label = $"{v.Percentage}% {v.Statut}"
};
donut.DataPoints.Add(point);
}
radChartView.Series.Add(donut);
radChartView.Area.View.Palette = KnownPalette.Metro;
radChartView.SelectionMode = ChartSelectionMode.SingleDataPoint;
radChartView.BackColor = Color.WhiteSmoke;
With small percentages, it doesn't work (except of the right bottom label)
With higher percentages it seems to be working :
The behavior is quite inconsistent.
Thank you for your help.