2017-02-13 64 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

相关问题