title: How To Display Test Outside Pie chart
body: <p>I am using MP Android Chart Lib, I want to hide the textview inside the cart and display text outside the chart </p>
  
  <p>Like this - <a href="https://i.stack.imgur.com/5FQRu.jpg" rel="nofollow noreferrer"> image here</a></p>
  
  <p>How can I display text outside the pie chart and Hide the text inside it.
  And Is its possible to use image shown in image</p>
  
  <p>Code I have Used-</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>@Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
      PieChart pieChart = (PieChart) findViewById(R.id.piechart);
          pieChart.setUsePercentValues(true);
  
          datatext = (TextView)findViewById(R.id.datatext);
  
          datatitle = (TextView)findViewById(R.id.datatitle);
  
          // IMPORTANT: In a PieChart, no values (Entry) should have the same
      // xIndex (even if from different DataSets), since no values can be
      // drawn above each other.
      ArrayList&lt;Entry&gt; yvalues = new ArrayList&lt;Entry&gt;();
          yvalues.add(new Entry(24f, 0));
          yvalues.add(new Entry(15f, 1));
          yvalues.add(new Entry(19f, 2));
          yvalues.add(new Entry(22f, 3));
          yvalues.add(new Entry(20f, 4));
          //yvalues.add(new Entry(17f, 5));
  
      PieDataSet dataSet = new PieDataSet(yvalues, "Balances");
  
      ArrayList&lt;String&gt; xVals = new ArrayList&lt;String&gt;();
  
          xVals.add("Monthly Expenses");
          xVals.add("Phonepe");
          xVals.add("Uber");
          xVals.add("Paytm");
          xVals.add("Savings");
         // xVals.add("Ola");
          dataSet.setDrawValues(false);
      PieData data = new PieData(xVals, dataSet);
      // In Percentage term
          data.setValueFormatter(new PercentFormatter());
      // Default value
      //data.setValueFormatter(new DefaultValueFormatter(0));
          pieChart.setData(data);
          pieChart.setDescription("Savings");
  
          pieChart.setDrawHoleEnabled(true);
          pieChart.setTransparentCircleRadius(25f);
          pieChart.setHoleRadius(25f);
  
          dataSet.setColors(ColorTemplate.VORDIPLOM_COLORS);
  
          data.setValueTextSize(13f);
          data.setValueTextColor(Color.DKGRAY);
          pieChart.setOnChartValueSelectedListener(this);
  
          pieChart.animateXY(1400, 1400);
  
  
  }
  
      @Override
      public void onValueSelected(Entry e, int dataSetIndex, Highlight h) {
  
          
          if (e == null)
              return;
          Log.i("VAL SELECTED",
                  "Value: " + e.getVal() + ", xIndex: " + e.getXIndex()
                          + ", DataSet index: " + dataSetIndex);
  
          float datatt = e.getVal();
          Toast.makeText(this, ""+datatt, Toast.LENGTH_SHORT).show();
          datatext.setText(""+datatt);
          //datatitle.setText(""+title);
      }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Please help me out in this</p>