-
- All Implemented Interfaces:
-
com.github.mikephil.charting.interfaces.datasets.IDataSet
public abstract class BaseDataSet<T extends Entry> implements IDataSet<T>
This is the base dataset of all DataSets. It's purpose is to implement critical methods provided by the IDataSet interface.
-
-
Field Summary
Fields Modifier and Type Field Description private final List<Integer>valueColors
-
Constructor Summary
Constructors Constructor Description BaseDataSet(String label)Constructor with label. BaseDataSet()
-
Method Summary
-
Methods inherited from class com.github.mikephil.charting.data.BaseDataSet
addEntry, addEntryOrdered, calcMinMax, calcMinMaxY, clear, getEntriesForXValue, getEntryCount, getEntryForIndex, getEntryForXValue, getEntryForXValue, getEntryIndex, getEntryIndex, getXMax, getXMin, getYMax, getYMin, removeEntry -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BaseDataSet
BaseDataSet(String label)
Constructor with label.
-
BaseDataSet
BaseDataSet()
-
-
Method Detail
-
getValueColors
final List<Integer> getValueColors()
-
notifyDataSetChanged
final Unit notifyDataSetChanged()
Use this method to tell the data set that the underlying data has changed.
-
setColors
final Unit setColors(List<Integer> colors)
Sets the colors that should be used fore this DataSet. Colors are reused as soon as the number of Entries the DataSet represents is higher than the size of the colors array. If you are using colors from the resources, make sure that the colors are already prepared (by calling ContextCompat.getColor(context,..) before adding them to the DataSet.
-
setColors
final Unit setColors(Integer colors)
Sets the colors that should be used fore this DataSet. Colors are reused as soon as the number of Entries the DataSet represents is higher than the size of the colors array. If you are using colors from the resources, make sure that the colors are already prepared (by calling ContextCompat.getColor(context,...)) before adding them to the DataSet.
-
setColors
final Unit setColors(IntArray colors, Context context)
Sets the colors that should be used fore this DataSet. Colors are reused as soon as the number of Entries the DataSet represents is higher than the size of the colors array. You can use "new int[] { R.color.red, R.color.green, ... }" to provide colors for this method. Internally, the colors are resolved using ContextCompat.getColor(context,...)
-
setColors
final Unit setColors(IntArray colors, Integer alpha)
Sets colors with a specific alpha value.
-
setColor
final Unit setColor(Integer color)
Sets the one and ONLY color that should be used for this DataSet. Internally, this recreates the colors array and adds the specified color.
-
setColor
final Unit setColor(Integer color, Integer alpha)
Sets a color with a specific alpha value.
- Parameters:
alpha- from 0-255
-
resetColors
final Unit resetColors()
Resets all colors of this DataSet and recreates the colors array.
-
setHighlightEnabled
Unit setHighlightEnabled(Boolean enabled)
-
isHighlightEnabled
Boolean isHighlightEnabled()
-
setValueFormatter
Unit setValueFormatter(IValueFormatter f)
-
getValueFormatter
IValueFormatter getValueFormatter()
-
needsFormatter
Boolean needsFormatter()
-
setValueTextColor
Unit setValueTextColor(Integer color)
-
setValueTextColors
Unit setValueTextColors(List<Integer> colors)
-
setValueTypeface
Unit setValueTypeface(Typeface tf)
-
setValueTextSize
Unit setValueTextSize(Float size)
-
getValueTextColor
Integer getValueTextColor()
-
getValueTextColor
Integer getValueTextColor(Integer index)
-
getValueTypeface
Typeface getValueTypeface()
-
getValueTextSize
Float getValueTextSize()
-
setForm
final Unit setForm(Legend.LegendForm form)
-
getForm
Legend.LegendForm getForm()
-
setFormSize
final Unit setFormSize(Float formSize)
-
getFormSize
Float getFormSize()
-
setFormLineWidth
final Unit setFormLineWidth(Float formLineWidth)
-
getFormLineWidth
Float getFormLineWidth()
-
setFormLineDashEffect
final Unit setFormLineDashEffect(DashPathEffect dashPathEffect)
-
getFormLineDashEffect
DashPathEffect getFormLineDashEffect()
-
setDrawValues
Unit setDrawValues(Boolean enabled)
-
isDrawValuesEnabled
Boolean isDrawValuesEnabled()
-
setDrawIcons
Unit setDrawIcons(Boolean enabled)
-
isDrawIconsEnabled
Boolean isDrawIconsEnabled()
-
setIconsOffset
Unit setIconsOffset(MPPointF offsetDp)
-
getIconsOffset
MPPointF getIconsOffset()
-
setVisible
Unit setVisible(Boolean visible)
-
getAxisDependency
YAxis.AxisDependency getAxisDependency()
-
setAxisDependency
Unit setAxisDependency(YAxis.AxisDependency dependency)
-
getIndexInEntries
Integer getIndexInEntries(Integer xIndex)
-
removeFirst
Boolean removeFirst()
-
removeLast
Boolean removeLast()
-
removeEntryByXValue
Boolean removeEntryByXValue(Float xValue)
-
removeEntry
Boolean removeEntry(Integer index)
-
-
-
-