public abstract class BaseDataSet<T extends Entry> extends java.lang.Object implements IDataSet<T>
| Modifier and Type | Field and Description |
|---|---|
protected YAxis.AxisDependency |
mAxisDependency
this specifies which axis this DataSet should be plotted against
|
protected java.util.List<java.lang.Integer> |
mColors
List representing all colors that are used for this DataSet
|
protected boolean |
mDrawValues
if true, y-values are drawn on the chart
|
protected boolean |
mHighlightEnabled
if true, value highlightning is enabled
|
protected java.util.List<java.lang.Integer> |
mValueColors
List representing all colors that are used for drawing the actual values for this DataSet
|
protected ValueFormatter |
mValueFormatter
custom formatter that is used instead of the auto-formatter if set
|
protected float |
mValueTextSize
the size of the value-text labels
|
protected android.graphics.Typeface |
mValueTypeface
the typeface used for the value text
|
protected boolean |
mVisible
flag that indicates if the DataSet is visible or not
|
| Constructor and Description |
|---|
BaseDataSet()
Default constructor.
|
BaseDataSet(java.lang.String label)
Constructor with label.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addColor(int color)
Adds a new color to the colors array of the DataSet.
|
boolean |
contains(T e)
Checks if this DataSet contains the specified Entry.
|
YAxis.AxisDependency |
getAxisDependency()
Returns the axis this DataSet should be plotted against.
|
int |
getColor()
Returns the first color (index 0) of the colors-array this DataSet
contains.
|
int |
getColor(int index)
Returns the color at the given index of the DataSet's color array.
|
java.util.List<java.lang.Integer> |
getColors()
###### ###### COLOR GETTING RELATED METHODS ##### ######
|
int |
getIndexInEntries(int xIndex)
###### ###### DATA RELATED METHODS ###### ######
|
java.lang.String |
getLabel()
Returns the label string that describes the DataSet.
|
java.util.List<java.lang.Integer> |
getValueColors() |
ValueFormatter |
getValueFormatter()
Returns the formatter used for drawing the values inside the chart.
|
int |
getValueTextColor()
Returns only the first color of all colors that are set to be used for the values.
|
int |
getValueTextColor(int index)
Returns the color at the specified index that is used for drawing the values inside the chart.
|
float |
getValueTextSize()
Returns the text size that is used for drawing the values inside the chart
|
android.graphics.Typeface |
getValueTypeface()
Returns the typeface that is used for drawing the values inside the chart
|
boolean |
isDrawValuesEnabled()
Returns true if y-value drawing is enabled, false if not
|
boolean |
isHighlightEnabled()
returns true if highlighting of values is enabled, false if not
|
boolean |
isVisible()
Returns true if this DataSet is visible inside the chart, or false if it
is currently hidden.
|
void |
notifyDataSetChanged()
Use this method to tell the data set that the underlying data has changed.
|
boolean |
removeEntry(int xIndex)
Removes the Entry object that has the given xIndex from the DataSet.
|
boolean |
removeFirst()
Removes the first Entry (at index 0) of this DataSet from the entries array.
|
boolean |
removeLast()
Removes the last Entry (at index size-1) of this DataSet from the entries array.
|
void |
resetColors()
Resets all colors of this DataSet and recreates the colors array.
|
void |
setAxisDependency(YAxis.AxisDependency dependency)
Set the y-axis this DataSet should be plotted against (either LEFT or
RIGHT).
|
void |
setColor(int color)
Sets the one and ONLY color that should be used for this DataSet.
|
void |
setColor(int color,
int alpha)
Sets a color with a specific alpha value.
|
void |
setColors(int[] colors)
Sets the colors that should be used fore this DataSet.
|
void |
setColors(int[] colors,
android.content.Context c)
Sets the colors that should be used fore this DataSet.
|
void |
setColors(int[] colors,
int alpha)
Sets colors with a specific alpha value.
|
void |
setColors(java.util.List<java.lang.Integer> colors)
Sets the colors that should be used fore this DataSet.
|
void |
setDrawValues(boolean enabled)
set this to true to draw y-values on the chart NOTE (for bar and
linechart): if "maxvisiblecount" is reached, no values will be drawn even
if this is enabled
|
void |
setHighlightEnabled(boolean enabled)
If set to true, value highlighting is enabled which means that values can
be highlighted programmatically or by touch gesture.
|
void |
setLabel(java.lang.String label)
###### ###### OTHER STYLING RELATED METHODS ##### ######
|
void |
setValueFormatter(ValueFormatter f)
Sets the formatter to be used for drawing the values inside the chart.
|
void |
setValueTextColor(int color)
Sets the color the value-labels of this DataSet should have.
|
void |
setValueTextColors(java.util.List<java.lang.Integer> colors)
Sets a list of colors to be used as the colors for the drawn values.
|
void |
setValueTextSize(float size)
Sets the text-size of the value-labels of this DataSet in dp.
|
void |
setValueTypeface(android.graphics.Typeface tf)
Sets a Typeface for the value-labels of this DataSet.
|
void |
setVisible(boolean visible)
Set the visibility of this DataSet.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddEntry, addEntryOrdered, calcMinMax, clear, getEntryCount, getEntryForIndex, getEntryForXIndex, getEntryForXIndex, getEntryIndex, getEntryIndex, getYMax, getYMin, getYValForXIndex, removeEntryprotected java.util.List<java.lang.Integer> mColors
protected java.util.List<java.lang.Integer> mValueColors
protected YAxis.AxisDependency mAxisDependency
protected boolean mHighlightEnabled
protected transient ValueFormatter mValueFormatter
protected android.graphics.Typeface mValueTypeface
protected boolean mDrawValues
protected float mValueTextSize
protected boolean mVisible
public BaseDataSet()
public BaseDataSet(java.lang.String label)
label - public void notifyDataSetChanged()
public java.util.List<java.lang.Integer> getColors()
public java.util.List<java.lang.Integer> getValueColors()
public int getColor()
IDataSetpublic int getColor(int index)
IDataSetpublic void setColors(java.util.List<java.lang.Integer> colors)
colors - public void setColors(int[] colors)
colors - public void setColors(int[] colors,
android.content.Context c)
colors - public void addColor(int color)
color - public void setColor(int color)
color - public void setColor(int color,
int alpha)
color - alpha - from 0-255public void setColors(int[] colors,
int alpha)
colors - alpha - public void resetColors()
public void setLabel(java.lang.String label)
public java.lang.String getLabel()
IDataSetpublic void setHighlightEnabled(boolean enabled)
IDataSetsetHighlightEnabled in interface IDataSet<T extends Entry>public boolean isHighlightEnabled()
IDataSetisHighlightEnabled in interface IDataSet<T extends Entry>public void setValueFormatter(ValueFormatter f)
IDataSetsetValueFormatter in interface IDataSet<T extends Entry>public ValueFormatter getValueFormatter()
IDataSetgetValueFormatter in interface IDataSet<T extends Entry>public void setValueTextColor(int color)
IDataSetsetValueTextColor in interface IDataSet<T extends Entry>public void setValueTextColors(java.util.List<java.lang.Integer> colors)
IDataSetsetValueTextColors in interface IDataSet<T extends Entry>public void setValueTypeface(android.graphics.Typeface tf)
IDataSetsetValueTypeface in interface IDataSet<T extends Entry>public void setValueTextSize(float size)
IDataSetsetValueTextSize in interface IDataSet<T extends Entry>public int getValueTextColor()
IDataSetgetValueTextColor in interface IDataSet<T extends Entry>public int getValueTextColor(int index)
IDataSetgetValueTextColor in interface IDataSet<T extends Entry>public android.graphics.Typeface getValueTypeface()
IDataSetgetValueTypeface in interface IDataSet<T extends Entry>public float getValueTextSize()
IDataSetgetValueTextSize in interface IDataSet<T extends Entry>public void setDrawValues(boolean enabled)
IDataSetsetDrawValues in interface IDataSet<T extends Entry>public boolean isDrawValuesEnabled()
IDataSetisDrawValuesEnabled in interface IDataSet<T extends Entry>public void setVisible(boolean visible)
IDataSetsetVisible in interface IDataSet<T extends Entry>public boolean isVisible()
IDataSetpublic YAxis.AxisDependency getAxisDependency()
IDataSetgetAxisDependency in interface IDataSet<T extends Entry>public void setAxisDependency(YAxis.AxisDependency dependency)
IDataSetsetAxisDependency in interface IDataSet<T extends Entry>public int getIndexInEntries(int xIndex)
getIndexInEntries in interface IDataSet<T extends Entry>public boolean removeFirst()
IDataSetremoveFirst in interface IDataSet<T extends Entry>public boolean removeLast()
IDataSetremoveLast in interface IDataSet<T extends Entry>public boolean removeEntry(int xIndex)
IDataSetremoveEntry in interface IDataSet<T extends Entry>