-
- All Implemented Interfaces:
-
android.graphics.drawable.Drawable.Callback,android.view.KeyEvent.Callback,android.view.ViewManager,android.view.ViewParent,android.view.accessibility.AccessibilityEventSource,com.github.mikephil.charting.interfaces.dataprovider.BarDataProvider,com.github.mikephil.charting.interfaces.dataprovider.BarLineScatterCandleBubbleDataProvider,com.github.mikephil.charting.interfaces.dataprovider.ChartInterface
public class BarChart extends BarLineChartBase<BarData> implements BarDataProvider
Chart that draws bars.
-
-
Constructor Summary
Constructors Constructor Description BarChart(Context context)BarChart(Context context, AttributeSet attrs)BarChart(Context context, AttributeSet attrs, int defStyle)
-
Method Summary
Modifier and Type Method Description HighlightgetHighlightByTouchPoint(float x, float y)Returns the Highlight object (contains x-index and DataSet index) of the selected value at the given touchpointinside the BarChart. RectFgetBarBounds(BarEntry barEntry)Returns the bounding box of the specified Entry in the specified DataSet. voidgetBarBounds(BarEntry barEntry, RectF outputRect)The passed outputRect will be assigned the values of the bounding box of the specified Entry in the specified DataSet.The rect will be assigned Float.MIN_VALUE in all locations if the Entry could not be found in the charts data. voidsetDrawValueAboveBar(boolean enabled)If set to true, all values are drawn above their bars, instead of below their top. booleanisDrawValueAboveBarEnabled()returns true if drawing values above bars is enabled, false if not voidsetDrawBarShadow(boolean enabled)If set to true, a grey area is drawn behind each bar that indicates the maximum value. booleanisDrawBarShadowEnabled()returns true if drawing shadows (maxvalue) for each bar is enabled, false if not voidsetHighlightFullBarEnabled(boolean enabled)Set this to true to make the highlight operation full-bar oriented, false to make it highlight single values (relevantonly for stacked). booleanisHighlightFullBarEnabled()voidhighlightValue(float x, int dataSetIndex, int stackIndex)Highlights the value at the given x-value in the given DataSet. BarDatagetBarData()voidsetFitBars(boolean enabled)Adds half of the bar width to each side of the x-axis range in order to allow the bars of the barchart to befully displayed. voidgroupBars(float fromX, float groupSpace, float barSpace)Groups all BarDataSet objects this data object holds together by modifying the x-value of their entries.Previously set x-values of entries will be overwritten. voidsetRoundedBarRadius(float mRoundedBarRadius)Used to enable rounded bar chart bars and set the radius of the rounded bars StringgetAccessibilityDescription()-
Methods inherited from class com.github.mikephil.charting.charts.BarLineChartBase
calculateOffsets, centerViewTo, centerViewToAnimated, centerViewToY, computeScroll, fitScreen, getAxis, getAxisLeft, getAxisRight, getDataSetByTouchPoint, getDrawListener, getEntryByTouchPoint, getHighestVisibleX, getLowestVisibleX, getMaxVisibleCount, getMinOffset, getPaint, getPixelForValues, getPosition, getRendererLeftYAxis, getRendererRightYAxis, getRendererXAxis, getScaleX, getScaleY, getTransformer, getValuesByTouchPoint, getValuesByTouchPoint, getVisibleXRange, getYChartMax, getYChartMin, hasNoDragOffset, isAnyAxisInverted, isAutoScaleMinMaxEnabled, isClipDataToContentEnabled, isClipValuesToContentEnabled, isDoubleTapToZoomEnabled, isDragEnabled, isDragXEnabled, isDragYEnabled, isDrawBordersEnabled, isFlingEnabled, isFullyZoomedOut, isHighlightPerDragEnabled, isInverted, isKeepPositionOnRotation, isPinchZoomEnabled, isScaleXEnabled, isScaleYEnabled, moveViewTo, moveViewToAnimated, moveViewToX, notifyDataSetChanged, onTouchEvent, resetTracking, resetViewPortOffsets, resetZoom, setAutoScaleMinMaxEnabled, setBorderColor, setBorderWidth, setClipDataToContent, setClipValuesToContent, setDoubleTapToZoomEnabled, setDragEnabled, setDragOffsetX, setDragOffsetY, setDragXEnabled, setDragYEnabled, setDrawBorders, setDrawGridBackground, setFlingEnabled, setGridBackgroundColor, setHighlightPerDragEnabled, setKeepPositionOnRotation, setMaxVisibleValueCount, setMinOffset, setOnDrawListener, setPaint, setPinchZoom, setRendererLeftYAxis, setRendererRightYAxis, setScaleEnabled, setScaleMinima, setScaleXEnabled, setScaleYEnabled, setTextColor, setViewPortOffsets, setVisibleXRange, setVisibleXRangeMaximum, setVisibleXRangeMinimum, setVisibleYRange, setVisibleYRangeMaximum, setVisibleYRangeMinimum, setXAxisRenderer, zoom, zoom, zoomAndCenterAnimated, zoomIn, zoomOut, zoomToCenter -
Methods inherited from class com.github.mikephil.charting.charts.Chart
addViewportJob, animateX, animateX, animateXY, animateXY, animateXY, animateY, animateY, clear, clearAllViewportJobs, clearValues, disableScroll, dispatchPopulateAccessibilityEvent, enableScroll, getAccessibilitySummaryDescription, getAnimator, getCenter, getCenterOfView, getCenterOffsets, getChartBitmap, getContentRect, getData, getDefaultValueFormatter, getDescription, getDragDecelerationFrictionCoef, getExtraBottomOffset, getExtraLeftOffset, getExtraRightOffset, getExtraTopOffset, getHighlighted, getHighlighter, getJobs, getLegend, getLegendRenderer, getMarker, getMarkerView, getMaxHighlightDistance, getOnChartGestureListener, getOnTouchListener, getRenderer, getViewPortHandler, getXAxis, getXChartMax, getXChartMin, getXRange, getYMax, getYMin, highlightValue, highlightValue, highlightValue, highlightValue, highlightValue, highlightValue, highlightValue, highlightValue, highlightValue, highlightValue, highlightValues, isDragDecelerationEnabled, isDrawMarkerViewsEnabled, isDrawMarkersEnabled, isEmpty, isHighlightPerTapEnabled, isLogEnabled, removeViewportJob, saveToGallery, saveToGallery, saveToGallery, saveToPath, setAccessibilitySummaryDescription, setData, setDescription, setDragDecelerationEnabled, setDragDecelerationFrictionCoef, setDrawMarkerViews, setDrawMarkers, setExtraBottomOffset, setExtraLeftOffset, setExtraOffsets, setExtraRightOffset, setExtraTopOffset, setHardwareAccelerationEnabled, setHighlightPerTapEnabled, setHighlighter, setLogEnabled, setMarker, setMarkerView, setMaxHighlightDistance, setNoDataText, setNoDataTextAlignment, setNoDataTextColor, setNoDataTextTypeface, setOnChartGestureListener, setOnChartValueSelectedListener, setOnTouchListener, setRenderer, setTouchEnabled, setUnbindEnabled, valuesToHighlight -
Methods inherited from class android.view.ViewGroup
addChildrenForAccessibility, addExtraDataToAccessibilityNodeInfo, addFocusables, addKeyboardNavigationClusters, addStatesFromChildren, addTouchables, addView, bringChildToFront, childDrawableStateChanged, childHasTransientStateChanged, clearChildFocus, clearDisappearingChildren, clearFocus, dispatchApplyWindowInsets, dispatchCapturedPointerEvent, dispatchConfigurationChanged, dispatchCreateViewTranslationRequest, dispatchDisplayHint, dispatchDragEvent, dispatchDrawableHotspotChanged, dispatchFinishTemporaryDetach, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchPointerCaptureChanged, dispatchProvideAutofillStructure, dispatchProvideStructure, dispatchScrollCaptureSearch, dispatchSetActivated, dispatchSetSelected, dispatchStartTemporaryDetach, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchWindowFocusChanged, dispatchWindowInsetsAnimationEnd, dispatchWindowInsetsAnimationPrepare, dispatchWindowInsetsAnimationProgress, dispatchWindowInsetsAnimationStart, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, endViewTransition, findFocus, findOnBackInvokedDispatcherForChild, findViewsWithText, focusSearch, focusableViewAvailable, gatherTransparentRegion, generateLayoutParams, getAccessibilityClassName, getChildAt, getChildCount, getChildMeasureSpec, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isLayoutSuppressed, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onDescendantInvalidated, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestSendAccessibilityEvent, onResolvePointerIcon, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, restoreDefaultFocus, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setTouchscreenBlocksFocus, setTransitionGroup, setWindowInsetsAnimationCallback, shouldDelayChildPressedState, showContextMenuForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, suppressLayout, updateViewLayout -
Methods inherited from class android.view.View
addOnAttachStateChangeListener, addOnLayoutChangeListener, addOnUnhandledKeyEventListener, animate, announceForAccessibility, autofill, bringToFront, buildDrawingCache, buildLayer, callOnClick, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, cancelDragAndDrop, cancelLongPress, cancelPendingInputEvents, checkInputConnectionProxy, clearAnimation, clearPendingCredentialRequest, clearViewTranslationCallback, combineMeasuredStates, computeScroll, computeSystemWindowInsets, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, draw, drawableHotspotChanged, findOnBackInvokedDispatcher, findViewById, findViewWithTag, forceHasOverlappingRendering, forceLayout, generateDisplayHash, generateViewId, getAccessibilityDelegate, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityPaneTitle, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAllowedHandwritingDelegatePackageName, getAllowedHandwritingDelegatorPackageName, getAlpha, getAnimation, getAnimationMatrix, getApplicationWindowToken, getAttributeResolutionStack, getAttributeSourceResourceMap, getAutofillHints, getAutofillId, getAutofillType, getAutofillValue, getBackground, getBackgroundTintBlendMode, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentCaptureSession, getContentDescription, getContentSensitivity, getContext, getDefaultFocusHighlightEnabled, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getExplicitStyle, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusable, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintBlendMode, getForegroundTintList, getForegroundTintMode, getFrameContentVelocity, getGlobalVisibleRect, getHandler, getHandwritingBoundsOffsetBottom, getHandwritingBoundsOffsetLeft, getHandwritingBoundsOffsetRight, getHandwritingBoundsOffsetTop, getHandwritingDelegateFlags, getHandwritingDelegatorCallback, getHasOverlappingRendering, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarThumbDrawable, getHorizontalScrollbarTrackDrawable, getId, getImportantForAccessibility, getImportantForAutofill, getImportantForContentCapture, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLocalVisibleRect, getLocationInSurface, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextClusterForwardId, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineAmbientShadowColor, getOutlineProvider, getOutlineSpotShadowColor, getOverScrollMode, getOverlay, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPendingCredentialCallback, getPendingCredentialRequest, getPivotX, getPivotY, getPointerIcon, getPreferKeepClearRects, getReceiveContentMimeTypes, getRequestedFrameRate, getResources, getRevealOnFocusHint, getRight, getRootSurfaceControl, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollCaptureHint, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getSourceLayoutResId, getStateDescription, getStateListAnimator, getSystemGestureExclusionRects, getSystemUiVisibility, getTag, getTextAlignment, getTextDirection, getTooltipText, getTop, getTouchDelegate, getTouchables, getTransitionAlpha, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getUniqueDrawingId, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarThumbDrawable, getVerticalScrollbarTrackDrawable, getVerticalScrollbarWidth, getViewTranslationResponse, getViewTreeObserver, getVisibility, getWidth, getWindowId, getWindowInsetsController, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasExplicitFocusable, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOnLongClickListeners, hasOverlappingRendering, hasPointerCapture, hasWindowFocus, inflate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityDataSensitive, isAccessibilityFocused, isAccessibilityHeading, isActivated, isAttachedToWindow, isAutoHandwritingEnabled, isClickable, isContentSensitive, isContextClickable, isCredential, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isFocusedByDefault, isForceDarkAllowed, isHandwritingDelegate, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isImportantForAutofill, isImportantForContentCapture, isInEditMode, isInLayout, isInTouchMode, isKeyboardNavigationCluster, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingRelative, isPivotSet, isPreferKeepClear, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScreenReaderFocusable, isScrollContainer, isScrollbarFadingEnabled, isSelected, isShowingLayoutBounds, isShown, isSoundEffectsEnabled, isTemporarilyDetached, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, isVisibleToUserForAutofill, keyboardNavigationClusterSearch, measure, offsetLeftAndRight, offsetTopAndBottom, onApplyWindowInsets, onCancelPendingInputEvents, onCapturedPointerEvent, onCheckIsTextEditor, onCreateInputConnection, onCreateViewTranslationRequest, onCreateVirtualViewTranslationRequests, onDragEvent, onDrawForeground, onFilterTouchEventForSecurity, onFinishTemporaryDetach, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onPointerCaptureChange, onPopulateAccessibilityEvent, onProvideAutofillStructure, onProvideAutofillVirtualStructure, onProvideContentCaptureStructure, onProvideStructure, onProvideVirtualStructure, onReceiveContent, onRtlPropertiesChanged, onScreenStateChanged, onScrollCaptureSearch, onStartTemporaryDetach, onTouchEvent, onTrackballEvent, onViewTranslationResponse, onVirtualViewTranslationResponses, onVisibilityAggregated, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, performAccessibilityAction, performClick, performContextClick, performHapticFeedback, performLongClick, performReceiveContent, playSoundEffect, post, postDelayed, postInvalidate, postInvalidateDelayed, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, releasePointerCapture, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, removeOnUnhandledKeyEventListener, requestApplyInsets, requestFitSystemWindows, requestFocusFromTouch, requestLayout, requestPointerCapture, requestRectangleOnScreen, requestUnbufferedDispatch, requireViewById, resetPivot, resolveSize, resolveSizeAndState, restoreHierarchyState, saveAttributeDataForStyleable, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDataSensitive, setAccessibilityDelegate, setAccessibilityHeading, setAccessibilityLiveRegion, setAccessibilityPaneTitle, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAllowClickWhenDisabled, setAllowedHandwritingDelegatePackage, setAllowedHandwritingDelegatorPackage, setAlpha, setAnimation, setAnimationMatrix, setAutoHandwritingEnabled, setAutofillHints, setAutofillId, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintBlendMode, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentCaptureSession, setContentDescription, setContentSensitivity, setContextClickable, setDefaultFocusHighlightEnabled, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setFocusedByDefault, setForceDarkAllowed, setForeground, setForegroundGravity, setForegroundTintBlendMode, setForegroundTintList, setForegroundTintMode, setFrameContentVelocity, setHandwritingBoundsOffsets, setHandwritingDelegateFlags, setHandwritingDelegatorCallback, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHorizontalScrollbarThumbDrawable, setHorizontalScrollbarTrackDrawable, setHovered, setId, setImportantForAccessibility, setImportantForAutofill, setImportantForContentCapture, setIsCredential, setIsHandwritingDelegate, setKeepScreenOn, setKeyboardNavigationCluster, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLeftTopRightBottom, setLongClickable, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextClusterForwardId, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnCapturedPointerListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnReceiveContentListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineAmbientShadowColor, setOutlineProvider, setOutlineSpotShadowColor, setOverScrollMode, setPadding, setPaddingRelative, setPendingCredentialRequest, setPivotX, setPivotY, setPointerIcon, setPreferKeepClear, setPreferKeepClearRects, setPressed, setRenderEffect, setRequestedFrameRate, setRevealOnFocusHint, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScreenReaderFocusable, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollBarSize, setScrollBarStyle, setScrollCaptureCallback, setScrollCaptureHint, setScrollContainer, setScrollIndicators, setScrollX, setScrollY, setScrollbarFadingEnabled, setSelected, setSoundEffectsEnabled, setStateDescription, setStateListAnimator, setSystemGestureExclusionRects, setSystemUiVisibility, setTag, setTextAlignment, setTextDirection, setTooltipText, setTop, setTouchDelegate, setTransitionAlpha, setTransitionName, setTransitionVisibility, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVerticalScrollbarThumbDrawable, setVerticalScrollbarTrackDrawable, setViewTranslationCallback, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, startActionMode, startAnimation, startDrag, startDragAndDrop, startNestedScroll, stopNestedScroll, toString, transformMatrixToGlobal, transformMatrixToLocal, unscheduleDrawable, updateDragShadow, willNotCacheDrawing, willNotDraw -
Methods inherited from class com.github.mikephil.charting.interfaces.dataprovider.ChartInterface
getData, getHeight, getWidth -
Methods inherited from class com.github.mikephil.charting.interfaces.dataprovider.BarLineScatterCandleBubbleDataProvider
getData, getHighestVisibleX, getLowestVisibleX, getTransformer, isInverted -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
BarChart
BarChart(Context context)
-
BarChart
BarChart(Context context, AttributeSet attrs)
-
BarChart
BarChart(Context context, AttributeSet attrs, int defStyle)
-
-
Method Detail
-
getHighlightByTouchPoint
Highlight getHighlightByTouchPoint(float x, float y)
Returns the Highlight object (contains x-index and DataSet index) of the selected value at the given touchpointinside the BarChart.
-
getBarBounds
RectF getBarBounds(BarEntry barEntry)
Returns the bounding box of the specified Entry in the specified DataSet. Returns null if the Entry could not befound in the charts data. Performance-intensive code should use void getBarBounds(BarEntry, RectF) instead.
-
getBarBounds
void getBarBounds(BarEntry barEntry, RectF outputRect)
The passed outputRect will be assigned the values of the bounding box of the specified Entry in the specified DataSet.The rect will be assigned Float.MIN_VALUE in all locations if the Entry could not be found in the charts data.
-
setDrawValueAboveBar
void setDrawValueAboveBar(boolean enabled)
If set to true, all values are drawn above their bars, instead of below their top.
-
isDrawValueAboveBarEnabled
boolean isDrawValueAboveBarEnabled()
returns true if drawing values above bars is enabled, false if not
-
setDrawBarShadow
void setDrawBarShadow(boolean enabled)
If set to true, a grey area is drawn behind each bar that indicates the maximum value. Enabling his will reduceperformance by about 50%.
-
isDrawBarShadowEnabled
boolean isDrawBarShadowEnabled()
returns true if drawing shadows (maxvalue) for each bar is enabled, false if not
-
setHighlightFullBarEnabled
void setHighlightFullBarEnabled(boolean enabled)
Set this to true to make the highlight operation full-bar oriented, false to make it highlight single values (relevantonly for stacked). If enabled, highlighting operations will highlight the whole bar, even if only a single stack entrywas tapped.Default: false
-
isHighlightFullBarEnabled
boolean isHighlightFullBarEnabled()
-
highlightValue
void highlightValue(float x, int dataSetIndex, int stackIndex)
Highlights the value at the given x-value in the given DataSet. Provide-1 as the dataSetIndex to undo all highlighting.
- Parameters:
stackIndex- the index inside the stack - only relevant for stacked entries
-
getBarData
BarData getBarData()
-
setFitBars
void setFitBars(boolean enabled)
Adds half of the bar width to each side of the x-axis range in order to allow the bars of the barchart to befully displayed.Default: false
-
groupBars
void groupBars(float fromX, float groupSpace, float barSpace)
Groups all BarDataSet objects this data object holds together by modifying the x-value of their entries.Previously set x-values of entries will be overwritten. Leaves space between bars and groups as specifiedby the parameters.Calls notifyDataSetChanged() afterwards.
- Parameters:
fromX- the starting point on the x-axis where the grouping should begingroupSpace- the space between groups of bars in values (not pixels) e.g.barSpace- the space between individual bars in values (not pixels) e.g.
-
setRoundedBarRadius
void setRoundedBarRadius(float mRoundedBarRadius)
Used to enable rounded bar chart bars and set the radius of the rounded bars
- Parameters:
mRoundedBarRadius- - the radius of the rounded bars
-
getAccessibilityDescription
String getAccessibilityDescription()
-
-
-
-