我是MPAndroidchart的新手,这里我有一些水平条形图的问题

  1. how to align x axis label to left align

  2. how to align bar chart value to left side of bar for negative numbers

  3. how to fix avoid gap where x-y axis meet when axis line with is more

  4. how to fix bar overlapping on top of axis line while zooming

enter image description here

enter image description here

这是我的代码

HorizontalBarChart mStatGraph = (HorizontalBarChart) findViewById(R.id.reportlist_stat_graph);
    mStatGraph.setDrawBarShadow(false);
    mStatGraph.setDrawValueAboveBar(true);
    mStatGraph.getDescription().setEnabled(false);
    mStatGraph.setMaxVisibleValueCount(20);
    mStatGraph.setPinchZoom(false);
    mStatGraph.setDrawGridBackground(true);
    mStatGraph.setGridBackgroundColor(Color.WHITE);
    mStatGraph.setExtraBottomOffset(20);
    mStatGraph.setViewPortOffsets(5, 0, 5, 20);

    XAxis xl = mStatGraph.getXAxis();
    xl.setPosition(XAxis.XAxisPosition.BOTTOM);
    xl.setTypeface(mTfLight);
    xl.setTextSize(13f);
    xl.setTextColor(Color.parseColor("#2C3846"));
    xl.setAxisLineColor(Color.BLACK);
    xl.setAxisLineWidth(2f);
    xl.setDrawAxisLine(true);
    xl.setDrawGridLines(false);
    xl.setDrawLabels(true);
    xl.setGranularity(1f);
    xl.setAxisMinimum(0f);
    xl.setYOffset(2f);
    xl.setXOffset(10f);
    xl.setSpaceMin(2f);
    int lineChartXOffset = getResources().getInteger(R.integer.report_bar_chart_xoffset);
    xl.setXOffset(lineChartXOffset);
    mStatGraph.getRendererXAxis().getPaintAxisLabels().setTextAlign(Paint.Align.LEFT);


    YAxis yl = mStatGraph.getAxisLeft();
    yl.setDrawAxisLine(false);
    yl.setAxisLineWidth(0f);
    yl.setAxisLineWidth(Color.TRANSPARENT);
    yl.setDrawLabels(false);
    yl.setGridColor(Color.GRAY);
    yl.setDrawGridLines(true);
    yl.setAxisMinimum(-0.005f);
    yl.setSpaceBottom(5f);
    yl.setSpaceTop(5f);
    yl.setEnabled(true);

    YAxis yr = mStatGraph.getAxisRight();
    yr.setTypeface(mTfLight);
    yr.setTextSize(12f);
    yr.setDrawGridLines(false);
    yr.setDrawLabels(true);
    yr.setGridColor(Color.GRAY);
    yr.setAxisMinimum(-0.005f);
    yr.setXOffset(15f);
    yr.setYOffset(-3f);
    yr.setDrawAxisLine(true);
    yr.setAxisLineColor(Color.BLACK);
    yr.setAxisLineWidth(2f);
    yr.setSpaceBottom(5f);
    yr.setSpaceTop(5f);
    yr.setEnabled(true);
    yr.setValueFormatter(barGraphValueFormatter);

    mStatGraph.getLegend().setEnabled(false);
    setData();
    mStatGraph.setFitBars(true);
    mStatGraph.invalidate();

请帮我解决这些问题 . 提前致谢