Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

achartengine Legend issue

I am using achartengine for drawing a chart in my app. So far the chart is drawn succesfully. the only problem i have is when i try to remove the legends. As for my app I feel I do not want the legends. So I used

renderer.setShowLegend(false);

and it did takeaway the legends but it also takes away the x axis labels. can anybody tell me what is happening? or where i am doing mistake.

i tried adding

renderer.setDisplayChartValues(true); 

but it does not do anything.

like image 892
Ajax3.14 Avatar asked Dec 17 '22 11:12

Ajax3.14


1 Answers

You may want to set the margins of the chart manually. Something like this:

renderer.setMargins(new int[] { 20, 30, 15, 20 });

Also, make sure that the labels are enabled for displaying:

renderer.setShowLabels(true);
like image 149
Dan D. Avatar answered Jan 03 '23 18:01

Dan D.