Package 

Class BarDataSet

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

    
    public class BarDataSet
    extends BarLineScatterCandleBubbleDataSet<BarEntry> implements IBarDataSet
                        
    • Method Summary

      Modifier and Type Method Description
      DataSet<BarEntry> copy() Provides an exact copy of the DataSet this method is used on.
      List<Fill> getFills()
      Fill getFill(int index)
      List<Fill> getGradients() This method is deprecated.Use getFills() instead.
      Fill getGradient(int index) This method is deprecated.Use getFill(...) instead.
      void setGradientColor(int startColor, int endColor) Sets the start and end color for gradient color, ONLY color that should be used for this DataSet.
      void setGradientColors(List<Fill> gradientColors) This method is deprecated.Use setFills(...) instead.
      void setFills(List<Fill> fills) Sets the fills for the bars in this dataset.
      int getStackSize() Returns the maximum number of bars that can be stacked upon another inthis DataSet.
      boolean isStacked() Returns true if this DataSet is stacked (stacksize > 1) or not.
      int getEntryCountStacks() returns the overall entry count, including counting each stack-valueindividually
      void setBarShadowColor(int color) Sets the color used for drawing the bar-shadows.
      int getBarShadowColor() Returns the color used for drawing the bar-shadows.
      void setBarBorderWidth(float width) Sets the width used for drawing borders around the bars.If borderWidth == 0, no border will be drawn.
      float getBarBorderWidth() Returns the width used for drawing borders around the bars.If borderWidth == 0, no border will be drawn.
      void setBarBorderColor(int color) Sets the color drawing borders around the bars.
      int getBarBorderColor() Returns the color drawing borders around the bars.
      void setHighLightAlpha(int alpha) Set the alpha value (transparency) that is used for drawing the highlightindicator bar.
      int getHighLightAlpha() Returns the alpha value (transparency) that is used for drawing thehighlight indicator.
      void setStackLabels(Array<String> labels) Sets labels for different values of bar-stacks, in case there are one.
      Array<String> getStackLabels() Returns the labels used for the different value-stacks in the legend.This is only relevant for stacked bar entries.
      • 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 java.lang.Object

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

      • setGradientColor

         void setGradientColor(int startColor, int endColor)

        Sets the start and end color for gradient color, ONLY color that should be used for this DataSet.

      • setFills

         void setFills(List<Fill> fills)

        Sets the fills for the bars in this dataset.

      • getStackSize

         int getStackSize()

        Returns the maximum number of bars that can be stacked upon another inthis DataSet. This should return 1 for non stacked bars, and > 1 for stacked bars.

      • isStacked

         boolean isStacked()

        Returns true if this DataSet is stacked (stacksize > 1) or not.

      • getEntryCountStacks

         int getEntryCountStacks()

        returns the overall entry count, including counting each stack-valueindividually

      • setBarShadowColor

         void setBarShadowColor(int color)

        Sets the color used for drawing the bar-shadows. The bar shadows is asurface behind the bar that indicates the maximum value. Don't for get touse getResources().getColor(...) to set this. Or Color.rgb(...).

      • getBarShadowColor

         int getBarShadowColor()

        Returns the color used for drawing the bar-shadows. The bar shadows is asurface behind the bar that indicates the maximum value.

      • setBarBorderWidth

         void setBarBorderWidth(float width)

        Sets the width used for drawing borders around the bars.If borderWidth == 0, no border will be drawn.

      • getBarBorderWidth

         float getBarBorderWidth()

        Returns the width used for drawing borders around the bars.If borderWidth == 0, no border will be drawn.

      • setBarBorderColor

         void setBarBorderColor(int color)

        Sets the color drawing borders around the bars.

      • getBarBorderColor

         int getBarBorderColor()

        Returns the color drawing borders around the bars.

      • setHighLightAlpha

         void setHighLightAlpha(int alpha)

        Set the alpha value (transparency) that is used for drawing the highlightindicator bar. min = 0 (fully transparent), max = 255 (fully opaque)

      • getHighLightAlpha

         int getHighLightAlpha()

        Returns the alpha value (transparency) that is used for drawing thehighlight indicator.

      • setStackLabels

         void setStackLabels(Array<String> labels)

        Sets labels for different values of bar-stacks, in case there are one.

      • getStackLabels

         Array<String> getStackLabels()

        Returns the labels used for the different value-stacks in the legend.This is only relevant for stacked bar entries.