-
- All Implemented Interfaces:
-
java.io.Serializable
public class PieData extends ChartData<IPieDataSet>
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. Each PieData object can only represent one PieDataSet (multiple PieDataSets inside a single PieChart are not possible).
-
-
Constructor Summary
Constructors Constructor Description PieData()PieData(IPieDataSet dataSet)
-
Method Summary
Modifier and Type Method Description voidsetDataSet(IPieDataSet dataSet)Sets the PieDataSet this data object should represent. IPieDataSetgetDataSet()Returns the DataSet this PieData object represents. List<IPieDataSet>getDataSets()Returns all DataSet objects this ChartData object holds. IPieDataSetgetDataSetByIndex(int index)The PieData object can only have one DataSet. IPieDataSetgetDataSetByLabel(String label, boolean ignorecase)Returns the DataSet object with the given label. EntrygetEntryForHighlight(Highlight highlight)Get the Entry for a corresponding highlight object floatgetYValueSum()Returns the sum of all values in this PieData object. -
Methods inherited from class com.github.mikephil.charting.data.ChartData
addDataSet, addEntry, calcMinMaxY, clearValues, contains, getColors, getDataSetByIndex, getDataSetByLabel, getDataSetCount, getDataSetForEntry, getDataSetLabels, getDataSets, getEntryCount, getFirstRight, getIndexOfDataSet, getMaxEntryCountSet, getXMax, getXMin, getYMax, getYMax, getYMin, getYMin, isHighlightEnabled, notifyDataChanged, removeDataSet, removeDataSet, removeEntry, removeEntry, setDrawValues, setHighlightEnabled, setValueFormatter, setValueTextColor, setValueTextColors, setValueTextSize, setValueTypeface -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
PieData
PieData()
-
PieData
PieData(IPieDataSet dataSet)
-
-
Method Detail
-
setDataSet
void setDataSet(IPieDataSet dataSet)
Sets the PieDataSet this data object should represent.
-
getDataSet
IPieDataSet getDataSet()
Returns the DataSet this PieData object represents. A PieData object canonly contain one DataSet.
-
getDataSets
List<IPieDataSet> getDataSets()
Returns all DataSet objects this ChartData object holds.
-
getDataSetByIndex
IPieDataSet getDataSetByIndex(int index)
The PieData object can only have one DataSet. Use getDataSet() method instead.
-
getDataSetByLabel
IPieDataSet getDataSetByLabel(String label, boolean ignorecase)
Returns the DataSet object with the given label. Search can be casesensitive or not. IMPORTANT: This method does calculations at runtime.Use with care in performance critical situations.
-
getEntryForHighlight
Entry getEntryForHighlight(Highlight highlight)
Get the Entry for a corresponding highlight object
-
getYValueSum
float getYValueSum()
Returns the sum of all values in this PieData object.
-
-
-
-