This is a migrated thread and some comments may be shown as answers.

Position of data points on Xamarin Forms UWP Pie Chart

1 Answer 76 Views
Chart
This is a migrated thread and some comments may be shown as answers.
Ram Prasad
Top achievements
Rank 1
Ram Prasad asked on 11 Jul 2017, 10:40 AM

Hello,

Is there any way to change position of data points (numbers) on Xamarin Forms UWP/Windows Pie Chart, currently they render out side of Pie Chart, and get clipped.

Thanks,

Ram prasad

 

1 Answer, 1 is accepted

Sort by
0
Nasko
Telerik team
answered on 14 Jul 2017, 07:02 AM
Hi Ram,

By default UWP's native RadPieChart clips its content to restrict the elements to render outside its rectangle. So, what we could suggest you for you scenario is set the ClipToBounds property of the native Chart to False. That you could achieve by creating a custom PieChartRenderer for UWP and inside the UpdateNativeControl method set the mentioned above property:
[assembly: ExportRenderer(typeof(Telerik.XamarinForms.Chart.RadPieChart), typeof(CustomPieChartRenderer))]
namespace RadChartXF_1118682.UWP
{
    public class CustomPieChartRenderer : PieChartRenderer
    {
        protected override void UpdateNativeControl()
        {
            base.UpdateNativeControl();
            if (this.Control != null)
            {
                this.Control.ClipToBounds = false;
            }
        }
    }
}

Hope this helps.

Regards,
Nasko
Progress Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
Chart
Asked by
Ram Prasad
Top achievements
Rank 1
Answers by
Nasko
Telerik team
Share this question
or