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()
Calculates the minimum and maximum x and y values (mXMin, mXMax, mYMin, mYMax).
|
void |
calcMinMaxY(float fromX,
float toX)
Calculates the min and max y-values from the Entry closest to the given fromX to the Entry closest to the given toX value.
|
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> |
getEntriesForXValue(float xValue)
Returns all Entry objects found at the given x-value 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 |
getEntryForXValue(float xValue,
float closestToY)
Returns the first Entry object found at the given x-value with binary
search.
|
T |
getEntryForXValue(float xValue,
float closestToY,
DataSet.Rounding rounding)
Returns the first Entry object found at the given x-value with binary
search.
|
int |
getEntryIndex(float xValue,
float closestToY,
DataSet.Rounding rounding)
Returns the first Entry index found at the given x-value with binary
search.
|
int |
getEntryIndex(T e)
Returns the position of the provided entry in the DataSets Entry array.
|
Legend.LegendForm |
getForm()
The form to draw for this dataset in the legend.
|
android.graphics.DashPathEffect |
getFormLineDashEffect()
The line dash path effect used for shapes that consist of lines.
|
float |
getFormLineWidth()
The line width for drawing the form of this dataset in the legend
Return `Float.NaN` to use the default legend form line width.
|
float |
getFormSize()
The form size to draw for this dataset in the legend.
|
GradientColor |
getGradientColor()
Returns the Gradient color model
|
GradientColor |
getGradientColor(int index)
Returns the Gradient colors
|
java.util.List<GradientColor> |
getGradientColors()
Returns the Gradient colors
|
MPPointF |
getIconsOffset()
Get the offset for drawing icons.
|
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.
|
IValueFormatter |
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 |
getXMax()
returns the maximum x-value this DataSet holds
|
float |
getXMin()
returns the minimum x-value this DataSet holds
|
float |
getYMax()
returns the maximum y-value this DataSet holds
|
float |
getYMin()
returns the minimum y-value this DataSet holds
|
boolean |
isDrawIconsEnabled()
Returns true if y-icon drawing is enabled, false if not
|
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 |
needsFormatter()
Returns true if the valueFormatter object of this DataSet is null.
|
boolean |
removeEntry(int index)
Removes the Entry object at the given index in the values array from the DataSet.
|
boolean |
removeEntry(T e)
Removes an Entry from the DataSets entries array.
|
boolean |
removeEntryByXValue(float xValue)
Removes the Entry object closest to the given x-value 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 |
setAxisDependency(YAxis.AxisDependency dependency)
Set the y-axis this DataSet should be plotted against (either LEFT or
RIGHT).
|
void |
setDrawIcons(boolean enabled)
Set this to true to draw y-icons on the chart.
|
void |
setDrawValues(boolean enabled)
set this to true to draw y-values on the chart.
|
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 |
setIconsOffset(MPPointF offset)
Offset of icons drawn on the chart.
|
void |
setLabel(java.lang.String label)
Sets the label string that describes the DataSet.
|
void |
setValueFormatter(IValueFormatter 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()
float getXMin()
float getXMax()
int getEntryCount()
void calcMinMax()
void calcMinMaxY(float fromX,
float toX)
fromX - toX - T getEntryForXValue(float xValue, float closestToY, DataSet.Rounding rounding)
xValue - the x-valueclosestToY - If there are multiple y-values for the specified x-value,rounding - determine whether to round up/down/closest
if there is no Entry matching the provided x-valueT getEntryForXValue(float xValue, float closestToY)
xValue - the x-valueclosestToY - If there are multiple y-values for the specified x-value,java.util.List<T> getEntriesForXValue(float xValue)
xValue - T getEntryForIndex(int index)
index - int getEntryIndex(float xValue,
float closestToY,
DataSet.Rounding rounding)
xValue - the x-valueclosestToY - If there are multiple y-values for the specified x-value,rounding - determine whether to round up/down/closest
if there is no Entry matching the provided x-valueint getEntryIndex(T e)
e - int getIndexInEntries(int xIndex)
xIndex - boolean addEntry(T e)
e - void addEntryOrdered(T e)
e - boolean removeFirst()
boolean removeLast()
boolean removeEntry(T e)
e - boolean removeEntryByXValue(float xValue)
xValue - boolean removeEntry(int index)
index - 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()
GradientColor getGradientColor()
java.util.List<GradientColor> getGradientColors()
GradientColor getGradientColor(int index)
index - int getColor(int index)
index - boolean isHighlightEnabled()
void setHighlightEnabled(boolean enabled)
enabled - void setValueFormatter(IValueFormatter f)
f - IValueFormatter getValueFormatter()
boolean needsFormatter()
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()
Legend.LegendForm getForm()
float getFormSize()
float getFormLineWidth()
android.graphics.DashPathEffect getFormLineDashEffect()
void setDrawValues(boolean enabled)
enabled - boolean isDrawValuesEnabled()
void setDrawIcons(boolean enabled)
enabled - boolean isDrawIconsEnabled()
void setIconsOffset(MPPointF offset)
offset - MPPointF getIconsOffset()
void setVisible(boolean visible)
visible - boolean isVisible()