...
xAxis.setTextSize(14f); // 设置字体大小为18dp
dataSet.setValueTextSize(14f); // 设置字体大小为14dp
Legend legend = chart.getLegend();
legend.setFormSize(14f);
legend.setTextSize(14f);
legend.setYOffset(12f);//不起作用
legend.setXOffset(0f);
// chart.getLegend().setEnabled(false);//隐藏
chart.setExtraBottomOffset(20f);
...
注意setYOffset要配合下面这句话使用
chart.setExtraBottomOffset(20f);