public interface IDataSet<T extends Entry>
| Modifier and Type | Method and Description |
|---|---|
boolean |
addEntry(T e)
Adds an Entry to the DataSet dynamically.
|
void |
addEntryOrdered(T e)
Adds an Entry to the DataSet dynamically.
|
void |
calcMinMax(int start,
int end)
Calculates the minimum and maximum y value (mYMin, mYMax).
|
void |
clear()
Removes all values from this DataSet and does all necessary recalculations.
|
boolean |
contains(T entry)
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()
returns all the colors that are set for this DataSet
|
java.util.List<T> |
getEntriesForXIndex(int xIndex)
Returns all Entry objects found at the given xIndex with binary
search.
|
int |
getEntryCount()
Returns the number of y-values this DataSet represents -> the size of the y-values array
-> yvals.size()
|
T |
getEntryForIndex(int index)
Returns the Entry object found at the given index (NOT xIndex) in the values array.
|
T |
getEntryForXIndex(int xIndex)
Returns the first Entry object found at the given xIndex with binary
search.
|
T |
getEntryForXIndex(int xIndex,
DataSet.Rounding rounding)
Returns the first Entry object found at the given xIndex with binary
search.
|
int |
getEntryIndex(int xIndex,
DataSet.Rounding rounding)
Returns the first Entry index found at the given xIndex with binary
search.
|
int |
getEntryIndex(T e)
Returns the position of the provided entry in the DataSets Entry array.
|
int |
getIndexInEntries(int xIndex)
This method returns the actual
index in the Entry array of the DataSet for a given xIndex.
|
java.lang.String |
getLabel()
Returns the label string that describes the DataSet.
|
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
|
float |
getYMax()
returns the maximum y-value this DataSet holds
|
float |
getYMin()
returns the minimum y-value this DataSet holds
|
float |
getYValForXIndex(int xIndex)
Returns the value of the Entry object at the given xIndex.
|
float[] |
getYValsForXIndex(int xIndex)
Returns all of the y values of the Entry objects at the given xIndex.
|
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.
|
boolean |
removeEntry(int xIndex)
Removes the Entry object that has the given xIndex from the DataSet.
|
boolean |
removeEntry(T e)
Removes an Entry from the DataSets entries array.
|
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 |
setAxisDependency(YAxis.AxisDependency dependency)
Set the y-axis this DataSet should be plotted against (either LEFT or
RIGHT).
|
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)
Sets the label string that describes the DataSet.
|
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.
|
float getYMin()
float getYMax()
int getEntryCount()
void calcMinMax(int start,
int end)
start - starting index in your data listend - ending index in your data listT getEntryForXIndex(int xIndex, DataSet.Rounding rounding)
xIndex - rounding - determine to round up/down/closest if there is no Entry matching the provided x-indexT getEntryForXIndex(int xIndex)
xIndex - java.util.List<T> getEntriesForXIndex(int xIndex)
xIndex - T getEntryForIndex(int index)
index - int getEntryIndex(int xIndex,
DataSet.Rounding rounding)
xIndex - rounding - determine to round up/down/closest if there is no Entry matching the provided x-indexint getEntryIndex(T e)
e - float getYValForXIndex(int xIndex)
xIndex - float[] getYValsForXIndex(int xIndex)
xIndex - int getIndexInEntries(int xIndex)
xIndex - boolean addEntry(T e)
e - boolean removeEntry(T e)
e - void addEntryOrdered(T e)
e - boolean removeFirst()
boolean removeLast()
boolean removeEntry(int xIndex)
xIndex - boolean contains(T entry)
entry - void clear()
java.lang.String getLabel()
void setLabel(java.lang.String label)
label - YAxis.AxisDependency getAxisDependency()
void setAxisDependency(YAxis.AxisDependency dependency)
dependency - java.util.List<java.lang.Integer> getColors()
int getColor()
int getColor(int index)
index - boolean isHighlightEnabled()
void setHighlightEnabled(boolean enabled)
enabled - void setValueFormatter(ValueFormatter f)
f - ValueFormatter getValueFormatter()
void setValueTextColor(int color)
color - void setValueTextColors(java.util.List<java.lang.Integer> colors)
colors - void setValueTypeface(android.graphics.Typeface tf)
tf - void setValueTextSize(float size)
size - int getValueTextColor()
int getValueTextColor(int index)
index - android.graphics.Typeface getValueTypeface()
float getValueTextSize()
void setDrawValues(boolean enabled)
enabled - boolean isDrawValuesEnabled()
void setVisible(boolean visible)
visible - boolean isVisible()