Back to project page Thrift-box.
The source code is released under:
GNU General Public License
If you think the Android project Thrift-box listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.
package com.github.mikephil.charting.data; // ww w. ja v a2 s .co m import java.util.ArrayList; /** * A PieData object can only represent one DataSet. Unlike all other charts, the * legend labels of the PieChart are created from the x-values array, and not * from the DataSet labels. * * @author Philipp Jahoda */ public class PieData extends ChartData<PieDataSet> { public PieData(ArrayList<String> xVals) { super(xVals); } public PieData(String[] xVals) { super(xVals); } public PieData(ArrayList<String> xVals, PieDataSet dataSet) { super(xVals, toArrayList(dataSet)); } public PieData(String[] xVals, PieDataSet dataSet) { super(xVals, toArrayList(dataSet)); } private static ArrayList<PieDataSet> toArrayList(PieDataSet dataSet) { ArrayList<PieDataSet> sets = new ArrayList<PieDataSet>(); sets.add(dataSet); return sets; } /** * Returns the DataSet this PieData object represents. * * @return */ public PieDataSet getDataSet() { return (PieDataSet) mDataSets.get(0); } }