Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set labels for X and Y axis in dual line chart using aChartEngine in android?

Hi all I am very new to chart applications. I created dual line chart using aChartEngine for my android application. I cant set labels for y-axis in my chart.

I got chart like this.....

enter image description here

How can i do this can anybody help me? Thanks in advance.

like image 905
malavika Avatar asked Oct 17 '12 07:10

malavika


1 Answers

This will help you:

// hide the default labels
mrenderer.setYLabels(0);
// set the custom labels
mrenderer.addYTextLabel(0, "$0");
mrenderer.addYTextLabel(20000, "$20K");
...
// set the visible range
mrenderer.setYAxisMin(0);
mrenderer.setYAxisMax(140000);
like image 137
Dan D. Avatar answered Oct 14 '22 03:10

Dan D.