Package 

Class CandleDataSet

  • All Implemented Interfaces:
    com.github.mikephil.charting.interfaces.datasets.IBarLineScatterCandleBubbleDataSet , com.github.mikephil.charting.interfaces.datasets.ICandleDataSet , com.github.mikephil.charting.interfaces.datasets.IDataSet , com.github.mikephil.charting.interfaces.datasets.ILineScatterCandleRadarDataSet , com.github.mikephil.charting.interfaces.datasets.ILineScatterCandleRadarDataSet , java.io.Serializable

    
    public class CandleDataSet
    extends LineScatterCandleRadarDataSet<CandleEntry> implements ICandleDataSet
                        

    DataSet for the CandleStickChart.

    • Method Summary

      Modifier and Type Method Description
      DataSet<CandleEntry> copy() Provides an exact copy of the DataSet this method is used on.
      void setBarSpace(float space) Sets the space that is left out on the left and right side of eachcandle, default 0.1f (10%), max 0.
      float getBarSpace() Returns the space that is left out on the left and right side of eachcandle.
      void setShadowWidth(float width) Sets the width of the candle-shadow-line in pixels.
      float getShadowWidth() Returns the width of the candle-shadow-line in pixels.
      void setShowCandleBar(boolean showCandleBar) Sets whether the candle bars should show?
      boolean getShowCandleBar() Returns whether the candle bars should show?
      void setNeutralColor(int color) Sets the one and ONLY color that should be used for this DataSet whenopen == close.
      int getNeutralColor() Returns the neutral color (for open == close)
      void setIncreasingColor(int color) Sets the one and ONLY color that should be used for this DataSet whenopen <= close.
      int getIncreasingColor() Returns the increasing color (for open < close).
      void setDecreasingColor(int color) Sets the one and ONLY color that should be used for this DataSet whenopen > close.
      int getDecreasingColor() Returns the decreasing color (for open > close).
      Paint.Style getIncreasingPaintStyle() Returns paint style when open < close
      void setIncreasingPaintStyle(Paint.Style paintStyle) Sets paint style when open < close
      Paint.Style getDecreasingPaintStyle() Returns paint style when open > close
      void setDecreasingPaintStyle(Paint.Style decreasingPaintStyle) Sets paint style when open > close
      int getShadowColor() Returns shadow color for all entries
      void setShadowColor(int shadowColor) Sets shadow color for all entries
      boolean getShadowColorSameAsCandle() Is the shadow color same as the candle color?
      void setShadowColorSameAsCandle(boolean shadowColorSameAsCandle) Sets shadow color to be the same color as the candle color
      • 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 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • setBarSpace

         void setBarSpace(float space)

        Sets the space that is left out on the left and right side of eachcandle, default 0.1f (10%), max 0.45f, min 0f

      • getBarSpace

         float getBarSpace()

        Returns the space that is left out on the left and right side of eachcandle.

      • setShadowWidth

         void setShadowWidth(float width)

        Sets the width of the candle-shadow-line in pixels. Default 3f.

      • getShadowWidth

         float getShadowWidth()

        Returns the width of the candle-shadow-line in pixels.

      • setShowCandleBar

         void setShowCandleBar(boolean showCandleBar)

        Sets whether the candle bars should show?

      • getShowCandleBar

         boolean getShowCandleBar()

        Returns whether the candle bars should show?When false, only "ticks" will show- default: true

      • setNeutralColor

         void setNeutralColor(int color)

        Sets the one and ONLY color that should be used for this DataSet whenopen == close.

      • getNeutralColor

         int getNeutralColor()

        Returns the neutral color (for open == close)

      • setIncreasingColor

         void setIncreasingColor(int color)

        Sets the one and ONLY color that should be used for this DataSet whenopen <= close.

      • getIncreasingColor

         int getIncreasingColor()

        Returns the increasing color (for open < close).

      • setDecreasingColor

         void setDecreasingColor(int color)

        Sets the one and ONLY color that should be used for this DataSet whenopen > close.

      • getDecreasingColor

         int getDecreasingColor()

        Returns the decreasing color (for open > close).

      • getShadowColor

         int getShadowColor()

        Returns shadow color for all entries

      • setShadowColor

         void setShadowColor(int shadowColor)

        Sets shadow color for all entries

      • setShadowColorSameAsCandle

         void setShadowColorSameAsCandle(boolean shadowColorSameAsCandle)

        Sets shadow color to be the same color as the candle color