2017-02-13 103 views
0

我正在使用MPAndroidChart。我可以在圖表的背景中放置圖像嗎?

我想把圖像放在圖表的背景上,但我只知道改變背景顏色。

<com.github.mikephil.charting.charts.BarChart 
    android:id="@+id/chart" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent"/> 

我正在使用v2.2.4 jar文件。

任何人都可以幫助我嗎?

+0

XAXIS XL = barChart.getXAxis(); xl.setTextColor(getResources()。getColor(R.color.colorLineText)); YAxis rightAxis = barChart.getAxisRight(); rightAxis.setTextColor(getResources()。getColor(R.color.colorLineText)); –

回答

1

嘗試這種情況:

<com.github.mikephil.charting.charts.BarChart 
      android:id="@+id/chart" 
      android:layout_width="match_parent" 
      android:background="@drawable/your_image" 
      android:layout_height="match_parent"/> 
+1

立即解決。 謝謝:-)! – Jungyw93