Relative Content

Tag Archive for javaandroidbar-chartmpandroidchart

MPAndroidChart bar width change on re draw the chart?

I am using MPAndroidChart bar chart, to display data from cursor, and I have tabs used like filter, so whenever I choose different tab the data changes and I redraw the bar chart. At first draw everything is fine but when re-draw the width of the bar gets larger to the extent that only one bar displays on the visible screen.image 1 – everything is fineimage 2 – choosing another data filter, also everything is fineimage 3 – now when I choose the first tab again the width gets larger and takes the whole visible space
here is my code: