android - MPAndroidChart white Background -


i using mpandroidchart library. setting multi line chart data using mpandroidchart. it's working great background coming white. doing

        nhchart = new linechart(getactivity());         nhchart.setdescription("number of hits view");         nhchart = (linechart) hitsview.findviewbyid(r.id.line_chart_number_of_hits);          //int color = color.parsecolor("#80101010");         nhchart.setbackgroundcolor(color.parsecolor("#80101010"));         //nhchart.setbackgroundresource(r.drawable.background_portrate);         //nhchart.setbackground(getresources().getdrawable(r.drawable.background_portrate));          nhchart.setstartatzero(true);            nhchart.setdrawborder(true);          nhchart.setnodatatextdescription("no data available charts");          nhchart.setdrawyvalues(false);         nhchart.setdrawborder(true);         nhchart.setscaleenabled(true);          nhchart.sethighlightenabled(false);         nhchart.settouchenabled(true);         //nhchart.setgridcolor(color.white & 0x70ffffff);         //nhchart.setdragscaleenabled(true);             nhchart.setpinchzoom(true);          setdata(valuedate.size(),10000);         nhchart.animatex(2500);          legend l = nhchart.getlegend();         l.setform(legendform.circle);         l.setformsize(6f);         l.settextcolor(color.white);          ylabels y = nhchart.getylabels();         y.settextcolor(color.white);         y.setlabelcount(6);          xlabels x1 = nhchart.getxlabels();         x1.setcenterxlabeltext(true);         x1.setposition(xlabelposition.bottom);         x1.settextcolor(color.white); 

i plotting line graphs in post execute method of asynctask in fragment viewpager. other fragment showing graph shows same white background. tried setting color background nothing works. left blank, still showing me white background. updated latest jar not works. please help. here image how looks

you want transparent:

chart.setdrawgridbackground(false); 

and transparent bar:

chart.setdrawbarshadow(false); 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -