android - MPChart BarChart: draw x axis line on zero value -


i using mpchart displaying barchart. values positive , negative. want show xaxis used in math of traditional way. using code chart display vertical lines (only 0 wanted)

mxaxis = mchart.getxaxis(); mxaxis.setdrawgridlines(false); mxaxis.setenabled(false);  myaxis = mchart.getaxisleft(); myaxis.setdrawaxisline(false); myaxis.setdrawgridlines(true); myaxis.setstartatzero(false);  myaxisright = mchart.getaxisright(); myaxisright.setenabled(false); myaxisright.setdrawgridlines(false); 

please, provide sample removing horizontal lines zero

edit: when yaxis.setlabelcount(1) (1 because 0 value needed shown) impl looks like:

public void setlabelcount(int ycount) {     if(ycount > 25) {         ycount = 25;     }      if(ycount < 2) {         ycount = 2;     }      this.mlabelcount = ycount; } 

so, recommended override implementation?

i have got solution labels @ bottom

use in code

mxaxis = mchart.getxaxis(); mxaxis.setdrawgridlines(false); mxaxis.setenabled(true); xaxis.setposition(xaxis.xaxisposition.bottom); 

Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -