我正在使用MPAndroidChart庫。MPAndroidChart - 刪除頂部和底部空間
我在我的應用程序中實現了PieChart。一切工作正常,但在圖表頂部和底部有一個空白區域。 我需要刪除這個空間來想象我的活動佈局
我的問題是:
- 可以以編程方式刪除呢?
P.D.在我的佈局中,沒有marginTop或marginBottom。
佈局的xml:
<com.github.mikephil.charting.charts.PieChart
android:id="@+id/pieChart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/_home_consumed" >
</com.github.mikephil.charting.charts.PieChart>
好,非常感謝:d – alcaamado
此時(2016)餅圖沒有'setOffset'方法,我試圖與'setMinOffset'方法,但空白仍然在這裏,有什麼幫助? –
@RosendoRopher,我知道這是一種解決方法,但嘗試使用帶有負值的setExtraOffsets。它爲我工作。 – Daivid