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

X軸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

関連する問題