This question is locked. New answers and comments are not allowed.
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);
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
0
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
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
Hello Gill,
Yes, the legend now works with the chart.
Regards,
Victor
Telerik
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
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
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
Hi Margarita,
Please consider this example:
Please see the attachment for the screenshot of the result.
Regards,
Victor
Telerik
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