Open miracledrd opened 6 years ago
I also met the same problem. Have you solved it?
Hi, I had the same problem. This fixed it for me (You have to translate it to java, because I´m using the Swift-version): chartView.setViewPortOffsets(left: 0, top: 0, right: 0, bottom: 30) You have to try for yourself what fits best. (I have my x-labels shown at the bottom that´s because I need space at bottom)
Summary I am using BarChart by MPAndroidChart in my project. I have long labels in X Axis, so rotating it to 90 degree with setLabelRotationAngle(90f) to show it vertical. And have set mChart.setVisibleXRangeMaximum(5f), to view first 5 bars initially and more on horizontal scrolling. Issue is that long labels get cut off initially and on scrolling chart horizontally, chart will get resize on every scroll as labels are of different sizes. Let me know if code is require to attach here.
Device
Thank you very much.