-
- 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
-
-
Constructor Summary
Constructors Constructor Description BarDataSet(List<BarEntry> yVals, String label)
-
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()FillgetFill(int index)List<Fill>getGradients()This method is deprecated.Use getFills() instead. FillgetGradient(int index)This method is deprecated.Use getFill(...) instead. voidsetGradientColor(int startColor, int endColor)Sets the start and end color for gradient color, ONLY color that should be used for this DataSet. voidsetGradientColors(List<Fill> gradientColors)This method is deprecated.Use setFills(...) instead. voidsetFills(List<Fill> fills)Sets the fills for the bars in this dataset. intgetStackSize()Returns the maximum number of bars that can be stacked upon another inthis DataSet. booleanisStacked()Returns true if this DataSet is stacked (stacksize > 1) or not. intgetEntryCountStacks()returns the overall entry count, including counting each stack-valueindividually voidsetBarShadowColor(int color)Sets the color used for drawing the bar-shadows. intgetBarShadowColor()Returns the color used for drawing the bar-shadows. voidsetBarBorderWidth(float width)Sets the width used for drawing borders around the bars.If borderWidth == 0, no border will be drawn. floatgetBarBorderWidth()Returns the width used for drawing borders around the bars.If borderWidth == 0, no border will be drawn. voidsetBarBorderColor(int color)Sets the color drawing borders around the bars. intgetBarBorderColor()Returns the color drawing borders around the bars. voidsetHighLightAlpha(int alpha)Set the alpha value (transparency) that is used for drawing the highlightindicator bar. intgetHighLightAlpha()Returns the alpha value (transparency) that is used for drawing thehighlight indicator. voidsetStackLabels(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
-
getGradients
@Deprecated() List<Fill> getGradients()
This method is deprecated.Use getFills() instead.
-
getGradient
@Deprecated() Fill getGradient(int index)
This method is deprecated.Use getFill(...) instead.
-
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.
-
setGradientColors
@Deprecated() void setGradientColors(List<Fill> gradientColors)
This method is deprecated.Use setFills(...) instead.
-
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.
-
-
-
-