2015-02-24 50 views
0

我已經通過achartengine的XYMultipleSeriesRenderer文檔查找了整個stackoverflow的答案,我認爲是時候提出這個問題了。AChartEngine Legend圖標大小

我傳說中的圖標很小。並沒有使它們變大的功能。我嘗試設置圖例高度,適合圖例,爲圖例設置不同的文本大小,以及無數其他組合。有沒有辦法改變圖標大小?

這是圖像:tiny icons

如果你仔細觀察,圖例中的兩個項目都有一個小點。

回答

0

我也有這個問題。我已經只是隱藏傳說

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>