I want to create pie chart with some values . I created pie chart like this
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.
I want to create pie chart with some values . I created pie chart like this
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.
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);
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);