1

I want to create pie chart with some values . I created pie chart like this

enter image description here

Now i want to change label text color and reduce gap/space between pie and legend. How can i do this? Can anybody help me to resolve this? Thanks in advance.

malavika
  • 1,331
  • 4
  • 21
  • 54

2 Answers2

3

You can change the labels color this way:

renderer.setLabelsColor(Color.BLUE);

You can make the pie chart bigger which would get it closer to the legend this way:

renderer.setScale(1.25f);
Dan D.
  • 32,246
  • 5
  • 63
  • 79
0
     change the following things:=  

     // set up gradient paints for series...
    GradientColor gp0 = new GradientColor(Color.YELLOW, Color.rgb(2, 2, 64));
    GradientColor gp1 = new GradientColor(Color.WHITE, Color.rgb(0, 64, 0));
    GradientColor gp2 = new GradientColor(Color.YELLOW, Color.rgb(64, 0, 0));
    renderer.setSeriesPaintType(0, gp0);
    renderer.setSeriesPaintType(1, gp1);
    renderer.setSeriesPaintType(2, gp2);
Shyam
  • 6,376
  • 1
  • 24
  • 38