Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
Pie Chart legend not showing
posted

I am configuring pie chart using XamPieChart() , I am able to view pie chart but legends are not visible.

Code i am using to render charts is-

View view = null;
ItemLegend legend = new ItemLegend();
XamPieChart xamPieChart = new XamPieChart();
xamPieChart.ItemsSource = data;
xamPieChart.ValueMemberPath = "DataValue";
xamPieChart.LabelMemberPath = "Name";

xamPieChart.Legend = legend;

view = xamPieChart;

return view;

Parents
No Data
Reply
  • 34810
    Offline posted

    Hello Raj,

    The ItemLegend (and other Legend objects) in the Infragistics for Xamarin toolset are visual objects themselves. If they are not added to the view, they will not show up. I believe that is likely what is happening here – you need to add the ItemLegend to the page in order for it to show up as a legend for the XamPieChart.

    Please let me know if you have any other questions or concerns on this matter.

Children
No Data