Related to: MPAndroidChart BarChart xValues Issue -


english isn't first language please excuse if i'm not clear, feel free ask details.

i'm having same problem in post: mpandroidchart barchart xvalues issue

in barchart 2 series xvals labels aren't displayed correctly, here test cases:

case 1

xvals = 1 (index 0) 30 (index 29) (days in month, april) set1 = 3 values 3 days (10,17,22): a.e. barentry(100,10), barentry(200,17), barentry(300,22)   set2 = 3 values 3 days (4,11,18): a.e. barentry(100,4), barentry(200,11), barentry(300,18)   

in case barchart displays bars , xvals labels independent, bar below xvals label

case 2

xvals = 1 (index 0) 30 (index 29) (days in april)   set1 = previous added 0 values set2 index : a.e. barentry(0,4), barentry(100,10), barentry(0,11),barentry(200,17), barentry(0,18), barentry(300,22)   set2 = previous added 0 values set1 index : a.e. barentry(100,4), barentry(0,10), barentry(200,11),barentry(0,17), barentry(300,18), barentry(0,22)  

in case barchart displays bars , xvals labels independent, bar below xvals label

case 3

xvals = 1 (index 0) 30 (index 29) (days in april)   set1 filled 0 everyday barentry(0,[0 29]), added values 3 days (10,17,22): barentry(0,10)....   set2 filled 0 everyday barentry(0,[0 29]), added values 3 days (4,11,18): barentry(0,4)....   

in case can see every bar in right place relative xvals label it's orrible see these 0s!

please take note if in case 1 don't add set2 (so simple barchart 1 serie) it's ok without need 0 values.

the question is: how can rid of 0 values not needed (as in example in days 1 3 , on)?

thanks in advance

edit:
here screenshots, both same graph difference sets with/without days value.
code same multidataset example , works fine every graph.

only days data: http://mysite.altervista.org/temp/some.png

all days: http://mysite.altervista.org/temp/all.png

for getting rid of zeroes, use valueformatter, , return empty string whenever value zero.

concerning issue x-labels: i'm not sure issue here.

the chart dispalys many x-values there space on screen. position of x-labels depends on position in xvalues-array, , independent position of entries.

if zoom in, x-values should appear.


Comments

Popular posts from this blog

Email notification in google apps script -

c++ - Difference between pre and post decrement in recursive function argument -

javascript - IE11 incompatibility with jQuery's 'readonly'? -