Customising Graph in android -


hi using achartengine designing graph in android want space out y axis values seen in image . how can achieve .

graph achart engine

i have use following values design graph

series 1 :

   int x[] = {5, 10, 15, 20, 30 , 35, 45};    int y[] = {50, 100, 300, 200, 250 , 250 , 300}; 

and

series 2 :

    int x1[]={10,20,30,40,50,60,70};     int y1[]={50, 100, 300, 200, 250 , 250 , 300}; 

to add series using following code

xymultipleseriesdataset dataset = new xymultipleseriesdataset();             dataset.addseries(series);             dataset.addseries(series1); 

to add renderer file using following code

xymultipleseriesrenderer mrenderer = new xymultipleseriesrenderer();             xyseriesrenderer renderer = new xyseriesrenderer();             xyseriesrenderer renderer1 = new xyseriesrenderer();        mrenderer.setxlabelsalign(align.center);          mrenderer.setylabelsalign(align.right); 

then series added mrenderer , graphical view set

mrenderer.addseriesrenderer(renderer);             mrenderer.addseriesrenderer(renderer1);              graphicalview view = chartfactory.getlinechartview(context, dataset, mrenderer); 

just this:

mrenderer.setylabelspadding(15); 

Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -