我也有這個問題。我已經只是隱藏傳說
mRenderer.setShowLegend(false);
解決了它,並添加到我的.xml-File
我的圖表下方我的傳說:
graph.xml:
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:id="@+id/chart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal" />
<LinearLayout
android:id="@+id/legend"
android:layout_below="@+id/chart"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentStart="true"
android:layout_centerHorizontal="true"
android:orientation="horizontal">
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="-.- Correct"
android:textColor="@android:color/holo_red_dark"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
android:text="-.- Total"
android:textColor="@android:color/holo_blue_dark/>
</LinearLayout>
</RelativeLayout>