Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

MPAndroidChart remove legend

I am using MPAndroidChart library and I want to remove the values in in the top right corner of the PieChart, how can I do this ?

like image 643
Russell Ghana Avatar asked Apr 02 '15 20:04

Russell Ghana


People also ask

How do I remove a legend from Mpandroidchart?

use legend. setEnabled(false) instead.

What is legend in Mpandroidchart?

By default, all chart types support legends and will automatically generate and draw a legend after setting data for the chart. The Legend usually consists of multiple entries each represented by a label an a form/shape.


1 Answers

The values you are talking about belong to the Legend.

To disable them (prevent them from being displayed), call

Legend l = chart.getLegend();
l.setEnabled(false);
like image 92
Philipp Jahoda Avatar answered Oct 15 '22 02:10

Philipp Jahoda