Android mp android XAxisLeft 的图表集类型面

Android mp android chart set type face for XAxisLeft

我有一个使用库 MPAndroidChart

的折线图
    mChart.setData(data);
                        mChart.getAxisLeft().setTypeface(MyApplication.giloryItaly);
                        mChart.invalidate();

                        mChart.getXAxis().setTypeface(MyApplication.giloryItaly);
                        mChart.getAxisRight().setTypeface(MyApplication.giloryItaly);

问题是即使使用

也无法更改 AxisLeft 字体值
mChart.getAxisLeft().setTypeface(MyApplication.giloryItaly);

但适用于 XAxis

任何解决方案 如何为 AxisLeftAxisRight?

更改字体类型
Paint p = mChart.getPaint(Chart.PAINT_INFO);
p.setTextSize(...);
p.setColor(...);
p.setTypeface(...);

在你linechart,使用

LineChart horizontalPChartLine = (LineChart) findViewById(R.id.horizontalPChartLine);
        XAxis xAxis = horizontalPChartLine.getXAxis();
        xAxis.setTypeface(tf);
        xAxis.setTextSize(12f);
        xAxis.setTextColor(ColorTemplate.getHoloBlue());
        xAxis.setEnabled(true);

请检查Styling / modifying the axis