MPAndroidChart
MPAndroidChart copied to clipboard
Rotated Top XAxis labels gets out of view.
Please see the Screenshot of the Top XAxis labels being cut off. No codes changes made when switching between Library Version v2.2.0 (first image) and Library Version v2.2.2 (Second Image).
(not sure if related to #1462)
// Setup Axis
final XAxis xAxis = comboChart.getXAxis();
xAxis.setPosition(XAxis.XAxisPosition.TOP_INSIDE);
xAxis.setDrawLabels(true);
xAxis.setDrawAxisLine(false);
xAxis.setAxisLineColor(ActivityCompat.getColor(this, R.color.colorSecondaryText26));
xAxis.setDrawGridLines(true);
xAxis.setLabelsToSkip(0);
xAxis.setLabelRotationAngle(270f);
xAxis.setValueFormatter((original, index, viewPortHandler) -> {
switch (index) {
case 0:
return getString(R.string.chart_label_05h00);
case 16:
return getString(R.string.chart_label_21h00);
}
return "";
});

Thank you for your report. Unfortunately I cannot reproduce the issue. But it is highly likely this was (again) fixed past 2.2.2 - version 2.2.3 will be out soon I the issue should no longer be present then.
@PhilJay Thanks for the reply! Wil keep an eye out for v2.2.3