4
PieChart
はゲージのようなものを作成するのにsetMaxAngle
を使っています。しかし、削除する必要がある重要な空白があります。 PieChart
のビューポートを変更する方法が見つかりません。だから私はどのようにホワイトスペースを参照できますか?下の図を参照してください。MpAndroidChartsから円グラフの余分な空白を削除するにはどうすればよいですか?
私のレイアウトは以下の通りです:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.nextraq.anders.ui.dashboard.DashboardActivityFragment"
tools:showIn="@layout/dashboard_activity">
<android.support.v7.widget.CardView
style="@style/AndersMaterialTheme.Dashboard.Gadget"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<RelativeLayout
android:padding="@dimen/card_margin"
android:layout_width="match_parent"
android:layout_height="wrap_content">
<TextView
android:id="@+id/gadgetTitle"
android:layout_alignParentTop="true"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/mobiles"
android:ellipsize="end"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium" />
<com.github.mikephil.charting.charts.PieChart
android:id="@+id/mobileStateChart"
android:layout_below="@id/gadgetTitle"
android:layout_width="match_parent"
android:layout_height="300dp"/>
</RelativeLayout>
</android.support.v7.widget.CardView>
答えてくれてありがとうございますが、それは私が言及したものではありません。私は円グラフの下の非常に大きな空白について話していました。テキスト "85 Mobiles"の下の空白。各パイスライス間のスペースではありません。 – chubbsondubs