PhilJay / MPAndroidChart

A powerful 🚀 Android chart view / graph view library, supporting line- bar- pie- radar- bubble- and candlestick charts as well as scaling, panning and animations.
Other
37.53k stars 9.01k forks source link

Content padding for line charts #2346

Open patrick-elmquist opened 7 years ago

patrick-elmquist commented 7 years ago

Hi, read around some but could not find an open issue (or a solved one, I did find an unanswered, closed one) describing this issue. In the screenshot below the Mon column is the first of the dataset and since it's first, it's grid line is being cut in half and the X axis seems to be to short. The same goes for the last item in the set. Is there any way to add start/end padding to the chart content, making the first and last items as big as the others?

pasted_image_at_2016_10_10_17_30

patrick-elmquist commented 7 years ago

I should add that I tried to adjust the spacing by modifying XAxis.setAxisMinValue/setAxisMaxValue but that also adds gridlines for those points which is not what I want

badjoras7 commented 7 years ago

mChart.setFitBars(true);