一、效果展示:
01.png
02.png
03.png
二、用法:
1、配置仓库:工程路径下面的build.gradle文件中引入 maven { url "https://jitpack.io" }
04.png
2、 引入jar包:
compile 'com.github.PhilJay:MPAndroidChart:v3.0.2'
3、XML中使用饼图控件
05.png
4、
package com.cd.mobile.demochart;
import android.graphics.Color;
import android.graphics.Typeface;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.text.SpannableString;
import android.text.style.ForegroundColorSpan;
import android.text.style.RelativeSizeSpan;
import android.text.style.StyleSpan;
import com.github.mikephil.charting.animation.Easing;
import com.github.mikephil.charting.charts.PieChart;
import com.github.mikephil.charting.components.Legend;
import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.da