Package 

Class LineDataSet

  • 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 enum LineDataSet.Mode
    • Method Summary

      Modifier and Type Method Description
      DataSet<Entry> copy() Provides an exact copy of the DataSet this method is used on.
      LineDataSet.Mode getMode() Returns the drawing mode for this line dataset
      void setMode(LineDataSet.Mode mode) Returns the drawing mode for this LineDataSet
      void setCubicIntensity(float intensity) Sets the intensity for cubic lines (if enabled).
      float getCubicIntensity() Returns the intensity of the cubic lines (the effect intensity).Max = 1f = very cubic, Min = 0.05f = low cubic effect, Default: 0.
      void setCircleRadius(float radius) Sets the radius of the drawn circles.
      float getCircleRadius() Returns the size of the drawn circles.
      void setCircleHoleRadius(float holeRadius) Sets the hole radius of the drawn circles.Default radius = 2f, Min = 0.
      float getCircleHoleRadius() Returns the hole radius of the drawn circles.
      void setCircleSize(float size) sets the size (radius) of the circle shpaed value indicators,default size = 4fThis method is deprecated because of unclarity.
      float getCircleSize() This function is deprecated because of unclarity.
      void enableDashedLine(float lineLength, float spaceLength, float phase) Enables the line to be drawn in dashed mode, e.g.
      void disableDashedLine() Disables the line to be drawn in dashed mode.
      boolean isDashedLineEnabled() Returns true if the dashed-line effect is enabled, false if not.If the DashPathEffect object is null, also return false here.
      DashPathEffect getDashPathEffect() Returns the DashPathEffect that is used for drawing the lines.
      void setDrawCircles(boolean enabled) set this to true to enable the drawing of circle indicators for thisDataSet, default true
      boolean isDrawCirclesEnabled() Returns true if drawing circles for this DataSet is enabled, false if not
      boolean isDrawCubicEnabled()
      boolean isDrawSteppedEnabled()
      List<Integer> getCircleColors() returns all colors specified for the circles
      int getCircleColor(int index) Returns the color at the given index of the DataSet's circle-color array.Performs a IndexOutOfBounds check by modulus.
      int getCircleColorCount() Returns the number of colors in this DataSet's circle-color array.
      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.
      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.
      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.
      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.
      void resetCircleColors() resets the circle-colors array and creates a new one
      void setCircleHoleColor(int color) Sets the color of the inner circle of the line-circles.
      int getCircleHoleColor() Returns the color of the inner circle (the circle-hole).
      void setDrawCircleHole(boolean enabled) Set this to true to allow drawing a hole in each data circle.
      boolean isDrawCircleHoleEnabled() Returns true if drawing the circle-holes is enabled, false if not.
      void setFillFormatter(IFillFormatter formatter) Sets a custom IFillFormatter to the chart that handles the position of thefilled-line for each DataSet.
      IFillFormatter getFillFormatter() 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

      • copy

         DataSet<Entry> copy()

        Provides an exact copy of the DataSet this method is used on.

      • 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 pieces
        spaceLength - the length of space in between the pieces
        phase - 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.

      • 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

      • 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.