Text over pieChart

Issue #45 new
Former user created an issue

How can we set percentage values over the piechart slices?

Comments (7)

  1. erhan asıkoglu

    ok i got to solution with

            pPaint.reset();
            pPaint.setAntiAlias(true);
            pPaint.setColor(getResources().getColor(R.color.white));
            pPaint.setTextSize(20);
    
            canvas.drawTextOnPath(slice.getTitle(),p,30,30,pPaint);
    

    but the problem is i want to show them in readable, i mean, i need to show text flat. how can i achieve this?

  2. Ryan Gurney

    I am very interested in a solution to put text directly in the middle of the pie chart. I have tried overlapping the xml to no effect. Sorry for the noob question, but does anyone have a quick fix to this problem?

  3. Daniel Nadeau repo owner

    You can overlap with a framelayout or relativelayout containing only the piegraph and a textview. I've done this before and it works just fine :)

  4. Ievgen Umanets

    How to place text like on the screen above.is there any ideas? is it possible to get central coordinates of a slice? Thank you

  5. erhan asıkoglu

    Yo can draw another pieChart outside of the original pieChart which has a transparent colors, and but the text same slice coordinates.

  6. Log in to comment