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

RadLegendView doesn't work with Pie Chart

7 Answers 84 Views
General Discussion
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Anil
Top achievements
Rank 1
Anil asked on 03 May 2014, 11:18 PM
Helllo,

I'm trying to add legends alongside my RadPieChartView on my android Fragment.
but nothing shows up on my fragment. No errors/warnings too.

Below is my code:

chartView = (RadPieChartView) rootView.findViewById(R.id.income_piechart);


PieSeries pieSeries = new PieSeries(getActivity().getBaseContext());
pieSeries.setValueBinding(new DataPointBinding() {
@Override
public Object getValue(Object o) throws IllegalArgumentException {
return ((PieChartData) o).value;
}
});
pieSeries.setData(data); 
pieSeries.setShowLabels(true);
CustomLabelRenderer renderer = new CustomLabelRenderer(pieSeries);
        pieSeries.setLabelRenderer(renderer);

chartView.getSeries().add(pieSeries);

RadLegendView legend = (RadLegendView) rootView.findViewById(R.id.income_legend);
legend.setLegendProvider(chartView);




7 Answers, 1 is accepted

Sort by
0
Antony Jekov
Telerik team
answered on 07 May 2014, 03:26 PM
Hello Anil,

Thank you for contacting us.

The public beta version of the chart does not currently support the legend view for pie charts. This is something that we have reviewed and it is yet to be implemented. It will be implemented in the next official release in June this year.

Thank you for your time and for your feedback!

Regards,
Antony Jekov
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
0
Gill
Top achievements
Rank 1
answered on 02 Jun 2015, 08:01 AM
Hi Has this been fixed yet?
0
Victor
Telerik team
answered on 05 Jun 2015, 08:36 AM
Hello Gill,

Yes, the legend now works with the chart.

Regards,
Victor
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
0
George
Top achievements
Rank 1
answered on 06 Jul 2015, 07:23 AM
This is something that we have reviewed and it is yet to be implemented.
0
Victor
Telerik team
answered on 06 Jul 2015, 11:30 AM
Hi George,

Thanks for writing.
Can you please explain what you mean by "it is yet to be implemented.". I tested the pie chart and it worked with the legend as expected. Is there a specific feature that you need?

Regards,
Victor
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
0
Margarita
Top achievements
Rank 1
answered on 11 Jul 2015, 12:09 PM

Hey Victor,

 

We also cannot get it to work.

Is it really implemented?

Can you send a working sample please?

Thanks,

Eric

0
Victor
Telerik team
answered on 16 Jul 2015, 08:45 AM
Hi Margarita,

Please consider this example:

RadPieChartView pie = new RadPieChartView(this);
PieSeries pieSeries = new PieSeries();
pieSeries.setValueBinding(new PropertyNameDataPointBinding("Value"));
pieSeries.setData(MainViewModel.GetSimpleData(5));
pie.getSeries().add(pieSeries);
RadLegendView legend = new RadLegendView(this);
legend.setLegendProvider(pie);
root.addView(pie);
root.addView(legend);

Please see the attachment for the screenshot of the result.


Regards,
Victor
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
General Discussion
Asked by
Anil
Top achievements
Rank 1
Answers by
Antony Jekov
Telerik team
Gill
Top achievements
Rank 1
Victor
Telerik team
George
Top achievements
Rank 1
Margarita
Top achievements
Rank 1
Share this question
or