使用MPAndroidChart(或任何其他Android图表库)是否可以在绘制线下面用渐变色填充图表?类似于这样:
set1.setFillColor(getResources().getColor(R.drawable.chart_fill));
然后在 chart_fill.xml
中:
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" >
<gradient
android:angle="90"
android:endColor="#FF207a54"
android:startColor="#FFffffff" />
</shape>