如何使用 MPAndroidChart BarChart 仅将 Y 轴值设置为左侧而不是左侧和右侧

How to set Y axis values to the left only and not on both left and right side using MPAndroidChart BarChart

我已经弄清楚如何使用以下方法将 X 轴值设置为显示在底部而不是顶部。我现在遇到的问题是我的 Y 轴值显示在左侧和右侧,我只希望它们显示在图表的左侧。

if (response.isSuccessful()) {
   // Reload data source
   Items = new ArrayList<>();
   Items.clear();
   Items.addAll(response.body());
   //currentReportingGroup = Items.get(0).ReportingGroup;
   //ItemsAdapter.notifyDataSetChanged();
   Log.i(TAG, "onResponse: ");
   //load(view);
   BarChart chart = (BarChart) aq.id(R.id.chart).getView();
   XAxis xAxisChart = chart.getXAxis();
   YAxis yAxisChart = chart.getAxisLeft();
   //yAxisChart.setValueFormatter(new MyAxisValueFormatter());
  // yAxisChart.setPosition(YAxis.YAxisLabelPosition.);
   xAxisChart.setPosition(XAxis.XAxisPosition.BOTTOM);
   BarData data = new BarData(getXAxisValues(), getDataSet());
   chart.setData(data);
   chart.setDescription("");
   chart.animateXY(2000, 2000);
   chart.invalidate();

}

您可以使用以下方法禁用右轴:

chart.getAxisRight().setEnabled(false);