Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Changing the legend size in AChartEngine

I would like to specifically change only the legend size outputting for a Pie Chart. I've tried all methods I can find for AChartEngine, but none of them only change the legend text size. Do I have to override the onDraw function? If so, how?

like image 906
Nathan Petersen Avatar asked Jan 13 '23 20:01

Nathan Petersen


1 Answers

For setting the legend height use:

renderer.setLegendHeight(height);

You can also have the legend take only the exact space it needs:

renderer.setFitLegend(true);

To change the legend text size:

renderer.setLegendTextSize(textSize);
like image 75
Dan D. Avatar answered Jan 16 '23 01:01

Dan D.