-
- All Implemented Interfaces:
-
com.github.mikephil.charting.interfaces.datasets.IBarLineScatterCandleBubbleDataSet,com.github.mikephil.charting.interfaces.datasets.IDataSet,com.github.mikephil.charting.interfaces.datasets.ILineDataSet,com.github.mikephil.charting.interfaces.datasets.ILineRadarDataSet,com.github.mikephil.charting.interfaces.datasets.ILineRadarDataSet,com.github.mikephil.charting.interfaces.datasets.ILineScatterCandleRadarDataSet,java.io.Serializable
public class LineDataSet extends LineRadarDataSet<Entry> implements ILineDataSet
ALL CODE BELOW RELATED TO CIRCLE-COLORS
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public enumLineDataSet.Mode
-
Constructor Summary
Constructors Constructor Description LineDataSet(List<Entry> yVals, String label)
-
Method Summary
Modifier and Type Method Description DataSet<Entry>copy()Provides an exact copy of the DataSet this method is used on. LineDataSet.ModegetMode()Returns the drawing mode for this line dataset voidsetMode(LineDataSet.Mode mode)Returns the drawing mode for this LineDataSet voidsetCubicIntensity(float intensity)Sets the intensity for cubic lines (if enabled). floatgetCubicIntensity()Returns the intensity of the cubic lines (the effect intensity).Max = 1f = very cubic, Min = 0.05f = low cubic effect, Default: 0. voidsetCircleRadius(float radius)Sets the radius of the drawn circles. floatgetCircleRadius()Returns the size of the drawn circles. voidsetCircleHoleRadius(float holeRadius)Sets the hole radius of the drawn circles.Default radius = 2f, Min = 0. floatgetCircleHoleRadius()Returns the hole radius of the drawn circles. voidsetCircleSize(float size)sets the size (radius) of the circle shpaed value indicators,default size = 4fThis method is deprecated because of unclarity. floatgetCircleSize()This function is deprecated because of unclarity. voidenableDashedLine(float lineLength, float spaceLength, float phase)Enables the line to be drawn in dashed mode, e.g. voiddisableDashedLine()Disables the line to be drawn in dashed mode. booleanisDashedLineEnabled()Returns true if the dashed-line effect is enabled, false if not.If the DashPathEffect object is null, also return false here. DashPathEffectgetDashPathEffect()Returns the DashPathEffect that is used for drawing the lines. voidsetDrawCircles(boolean enabled)set this to true to enable the drawing of circle indicators for thisDataSet, default true booleanisDrawCirclesEnabled()Returns true if drawing circles for this DataSet is enabled, false if not booleanisDrawCubicEnabled()booleanisDrawSteppedEnabled()List<Integer>getCircleColors()returns all colors specified for the circles intgetCircleColor(int index)Returns the color at the given index of the DataSet's circle-color array.Performs a IndexOutOfBounds check by modulus. intgetCircleColorCount()Returns the number of colors in this DataSet's circle-color array. voidsetCircleColors(List<Integer> colors)Sets the colors that should be used for the circles of this DataSet.Colors are reused as soon as the number of Entries the DataSet representsis higher than the size of the colors array. voidsetCircleColors(Array<int> colors)Sets the colors that should be used for the circles of this DataSet.Colors are reused as soon as the number of Entries the DataSet representsis higher than the size of the colors array. voidsetCircleColors(Array<int> colors, Context c)ets the colors that should be used for the circles of this DataSet.Colors are reused as soon as the number of Entries the DataSet representsis higher than the size of the colors array. voidsetCircleColor(int 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. voidresetCircleColors()resets the circle-colors array and creates a new one voidsetCircleHoleColor(int color)Sets the color of the inner circle of the line-circles. intgetCircleHoleColor()Returns the color of the inner circle (the circle-hole). voidsetDrawCircleHole(boolean enabled)Set this to true to allow drawing a hole in each data circle. booleanisDrawCircleHoleEnabled()Returns true if drawing the circle-holes is enabled, false if not. voidsetFillFormatter(IFillFormatter formatter)Sets a custom IFillFormatter to the chart that handles the position of thefilled-line for each DataSet. IFillFormattergetFillFormatter()Returns the IFillFormatter that is set for this DataSet. -
Methods inherited from class com.github.mikephil.charting.data.LineRadarDataSet
getFillAlpha, getFillColor, getFillDrawable, getLineWidth, isDrawFilledEnabled, setDrawFilled, setFillAlpha, setFillColor, setFillDrawable, setLineWidth -
Methods inherited from class com.github.mikephil.charting.data.LineScatterCandleRadarDataSet
disableDashedHighlightLine, enableDashedHighlightLine, getDashPathEffectHighlight, getHighlightLineWidth, isDashedHighlightLineEnabled, isHorizontalHighlightIndicatorEnabled, isVerticalHighlightIndicatorEnabled, setDrawHighlightIndicators, setDrawHorizontalHighlightIndicator, setDrawVerticalHighlightIndicator, setHighlightLineWidth -
Methods inherited from class com.github.mikephil.charting.data.BarLineScatterCandleBubbleDataSet
getHighLightColor, setHighLightColor -
Methods inherited from class com.github.mikephil.charting.data.DataSet
addEntry, addEntryOrdered, calcMinMax, calcMinMaxY, clear, copy, getEntries, getEntriesForXValue, getEntryCount, getEntryForIndex, getEntryForXValue, getEntryForXValue, getEntryIndex, getEntryIndex, getValues, getXMax, getXMin, getYMax, getYMin, removeEntry, setEntries, setValues, toSimpleString, toString -
Methods inherited from class com.github.mikephil.charting.data.BaseDataSet
addColor, contains, getAxisDependency, getColor, getColors, getForm, getFormLineDashEffect, getFormLineWidth, getFormSize, getIconsOffset, getIndexInEntries, getLabel, getValueColors, getValueFormatter, getValueTextColor, getValueTextSize, getValueTypeface, isDrawIconsEnabled, isDrawValuesEnabled, isHighlightEnabled, isVisible, needsFormatter, notifyDataSetChanged, removeEntry, removeEntryByXValue, removeFirst, removeLast, resetColors, setAxisDependency, setColor, setColors, setDrawIcons, setDrawValues, setForm, setFormLineDashEffect, setFormLineWidth, setFormSize, setHighlightEnabled, setIconsOffset, setLabel, setValueFormatter, setValueTextColor, setValueTextColors, setValueTextSize, setValueTypeface, setVisible -
Methods inherited from class com.github.mikephil.charting.interfaces.datasets.IDataSet
contains, getAxisDependency, getColor, getColor, getColors, getEntryForXValue, getEntryIndex, getEntryIndex, getForm, getFormLineDashEffect, getFormLineWidth, getFormSize, getIconsOffset, getIndexInEntries, getLabel, getValueFormatter, getValueTextColor, getValueTextColor, getValueTextSize, getValueTypeface, isDrawIconsEnabled, isDrawValuesEnabled, isHighlightEnabled, isVisible, needsFormatter, removeEntry, removeEntryByXValue, removeFirst, removeLast, setAxisDependency, setDrawIcons, setDrawValues, setHighlightEnabled, setIconsOffset, setLabel, setValueFormatter, setValueTextColor, setValueTextColors, setValueTextSize, setValueTypeface, setVisible -
Methods inherited from class com.github.mikephil.charting.interfaces.datasets.IBarLineScatterCandleBubbleDataSet
getHighLightColor -
Methods inherited from class com.github.mikephil.charting.interfaces.datasets.ILineScatterCandleRadarDataSet
getDashPathEffectHighlight, getHighlightLineWidth, isHorizontalHighlightIndicatorEnabled, isVerticalHighlightIndicatorEnabled -
Methods inherited from class com.github.mikephil.charting.interfaces.datasets.ILineRadarDataSet
setDrawFilled -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getMode
LineDataSet.Mode getMode()
Returns the drawing mode for this line dataset
-
setMode
void setMode(LineDataSet.Mode mode)
Returns the drawing mode for this LineDataSet
-
setCubicIntensity
void setCubicIntensity(float intensity)
Sets the intensity for cubic lines (if enabled). Max = 1f = very cubic,Min = 0.05f = low cubic effect, Default: 0.2f
-
getCubicIntensity
float getCubicIntensity()
Returns the intensity of the cubic lines (the effect intensity).Max = 1f = very cubic, Min = 0.05f = low cubic effect, Default: 0.2f
-
setCircleRadius
void setCircleRadius(float radius)
Sets the radius of the drawn circles.Default radius = 4f, Min = 1f
-
getCircleRadius
float getCircleRadius()
Returns the size of the drawn circles.
-
setCircleHoleRadius
void setCircleHoleRadius(float holeRadius)
Sets the hole radius of the drawn circles.Default radius = 2f, Min = 0.5f
-
getCircleHoleRadius
float getCircleHoleRadius()
Returns the hole radius of the drawn circles.
-
setCircleSize
@Deprecated() void setCircleSize(float size)
sets the size (radius) of the circle shpaed value indicators,default size = 4f
This method is deprecated because of unclarity. Use setCircleRadius instead.
-
getCircleSize
@Deprecated() float getCircleSize()
This function is deprecated because of unclarity. Use getCircleRadius instead.
-
enableDashedLine
void enableDashedLine(float lineLength, float spaceLength, float phase)
Enables the line to be drawn in dashed mode, e.g. like this"- - - - - -". THIS ONLY WORKS IF HARDWARE-ACCELERATION IS TURNED OFF.Keep in mind that hardware acceleration boosts performance.
- Parameters:
lineLength- the length of the line piecesspaceLength- the length of space in between the piecesphase- offset, in degrees (normally, use 0)
-
disableDashedLine
void disableDashedLine()
Disables the line to be drawn in dashed mode.
-
isDashedLineEnabled
boolean isDashedLineEnabled()
Returns true if the dashed-line effect is enabled, false if not.If the DashPathEffect object is null, also return false here.
-
getDashPathEffect
DashPathEffect getDashPathEffect()
Returns the DashPathEffect that is used for drawing the lines.
-
setDrawCircles
void setDrawCircles(boolean enabled)
set this to true to enable the drawing of circle indicators for thisDataSet, default true
-
isDrawCirclesEnabled
boolean isDrawCirclesEnabled()
Returns true if drawing circles for this DataSet is enabled, false if not
-
isDrawCubicEnabled
@Deprecated() boolean isDrawCubicEnabled()
-
isDrawSteppedEnabled
@Deprecated() boolean isDrawSteppedEnabled()
-
getCircleColors
List<Integer> getCircleColors()
returns all colors specified for the circles
-
getCircleColor
int getCircleColor(int index)
Returns the color at the given index of the DataSet's circle-color array.Performs a IndexOutOfBounds check by modulus.
-
getCircleColorCount
int getCircleColorCount()
Returns the number of colors in this DataSet's circle-color array.
-
setCircleColors
void setCircleColors(List<Integer> colors)
Sets the colors that should be used for the circles of this DataSet.Colors are reused as soon as the number of Entries the DataSet representsis higher than the size of the colors array. Make sure that the colorsare already prepared (by calling getResources().getColor(...)) beforeadding them to the DataSet.
-
setCircleColors
void setCircleColors(Array<int> colors)
Sets the colors that should be used for the circles of this DataSet.Colors are reused as soon as the number of Entries the DataSet representsis higher than the size of the colors array. Make sure that the colorsare already prepared (by calling getResources().getColor(...)) beforeadding them to the DataSet.
-
setCircleColors
void setCircleColors(Array<int> colors, Context c)
ets the colors that should be used for the circles of this DataSet.Colors are reused as soon as the number of Entries the DataSet representsis higher than the size of the colors array. You can use"new String[] { R.color.red, R.color.green, ... }" to provide colors forthis method. Internally, the colors are resolved usinggetResources().getColor(...)
-
setCircleColor
void setCircleColor(int 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.
-
resetCircleColors
void resetCircleColors()
resets the circle-colors array and creates a new one
-
setCircleHoleColor
void setCircleHoleColor(int color)
Sets the color of the inner circle of the line-circles.
-
getCircleHoleColor
int getCircleHoleColor()
Returns the color of the inner circle (the circle-hole).
-
setDrawCircleHole
void setDrawCircleHole(boolean enabled)
Set this to true to allow drawing a hole in each data circle.
-
isDrawCircleHoleEnabled
boolean isDrawCircleHoleEnabled()
Returns true if drawing the circle-holes is enabled, false if not.
-
setFillFormatter
void setFillFormatter(IFillFormatter formatter)
Sets a custom IFillFormatter to the chart that handles the position of thefilled-line for each DataSet. Set this to null to use the default logic.
-
getFillFormatter
IFillFormatter getFillFormatter()
Returns the IFillFormatter that is set for this DataSet.
-
-
-
-