So I have a PieChart
that is using setMaxAngle
to create something like a gauge. However, there is significant whitespace under it that I need to remove. I can't find any methods to modify the viewport for PieChart
. So how can I refer the white space? See pic below.
My layout is the following:
<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>
PieDataSet dataset = new PieDataSet(entries, "# of Calls");
dataset.setSliceSpace(0f);
I hope you that helpful
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With