public abstract class BarLineChartBase<T extends BarLineScatterCandleBubbleData<? extends IBarLineScatterCandleBubbleDataSet<? extends Entry>>> extends Chart<T> implements BarLineScatterCandleBubbleDataProvider
android.view.ViewGroup.LayoutParams, android.view.ViewGroup.MarginLayoutParams, android.view.ViewGroup.OnHierarchyChangeListenerandroid.view.View.AccessibilityDelegate, android.view.View.BaseSavedState, android.view.View.DragShadowBuilder, android.view.View.MeasureSpec, android.view.View.OnApplyWindowInsetsListener, android.view.View.OnAttachStateChangeListener, android.view.View.OnClickListener, android.view.View.OnContextClickListener, android.view.View.OnCreateContextMenuListener, android.view.View.OnDragListener, android.view.View.OnFocusChangeListener, android.view.View.OnGenericMotionListener, android.view.View.OnHoverListener, android.view.View.OnKeyListener, android.view.View.OnLayoutChangeListener, android.view.View.OnLongClickListener, android.view.View.OnScrollChangeListener, android.view.View.OnSystemUiVisibilityChangeListener, android.view.View.OnTouchListener| Modifier and Type | Field and Description |
|---|---|
protected YAxis |
mAxisLeft
the object representing the labels on the left y-axis
|
protected YAxisRenderer |
mAxisRendererLeft |
protected YAxisRenderer |
mAxisRendererRight |
protected YAxis |
mAxisRight
the object representing the labels on the right y-axis
|
protected android.graphics.Paint |
mBorderPaint |
protected boolean |
mDoubleTapToZoomEnabled
flag that indicates if double tap zoom is enabled or not
|
protected boolean |
mDrawBorders |
protected boolean |
mDrawGridBackground
flag indicating if the grid background should be drawn or not
|
protected OnDrawListener |
mDrawListener
the listener for user drawing on the chart
|
protected android.graphics.Paint |
mGridBackgroundPaint
paint object for the (by default) lightgrey background of the grid
|
protected boolean |
mHighlightFullBarEnabled
flag that indicates whether the highlight should be full-bar oriented, or single-value?
|
protected boolean |
mHighlightPerDragEnabled
flag that indicates if highlighting per dragging over a fully zoomed out
chart is enabled
|
protected boolean |
mKeepPositionOnRotation
flag indicating if the chart should stay at the same position after a rotation.
|
protected Transformer |
mLeftAxisTransformer |
protected int |
mMaxVisibleCount
the maximum number of entries to which values will be drawn
(entry numbers greater than this value will cause value-labels to disappear)
|
protected float |
mMinOffset
Sets the minimum offset (padding) around the chart, defaults to 15
|
protected boolean |
mPinchZoomEnabled
flag that indicates if pinch-zoom is enabled.
|
protected Transformer |
mRightAxisTransformer |
protected XAxisRenderer |
mXAxisRenderer |
LOG_TAG, mAnimator, mChartTouchListener, mData, mDefaultFormatter, mDescPaint, mDescription, mDrawMarkerViews, mDrawPaint, mHighlighter, mHighLightPerTapEnabled, mIndicesToHighlight, mInfoPaint, mJobs, mLegend, mLegendRenderer, mLogEnabled, mMarkerView, mRenderer, mSelectionListener, mTouchEnabled, mViewPortHandler, mXAxis, PAINT_CENTER_TEXT, PAINT_DESCRIPTION, PAINT_GRID_BACKGROUND, PAINT_HOLE, PAINT_INFO, PAINT_LEGEND_LABELCLIP_TO_PADDING_MASK, FOCUS_AFTER_DESCENDANTS, FOCUS_BEFORE_DESCENDANTS, FOCUS_BLOCK_DESCENDANTS, LAYOUT_MODE_CLIP_BOUNDS, LAYOUT_MODE_OPTICAL_BOUNDS, PERSISTENT_ALL_CACHES, PERSISTENT_ANIMATION_CACHE, PERSISTENT_NO_CACHE, PERSISTENT_SCROLLING_CACHEACCESSIBILITY_LIVE_REGION_ASSERTIVE, ACCESSIBILITY_LIVE_REGION_NONE, ACCESSIBILITY_LIVE_REGION_POLITE, ALPHA, DRAWING_CACHE_QUALITY_AUTO, DRAWING_CACHE_QUALITY_HIGH, DRAWING_CACHE_QUALITY_LOW, EMPTY_STATE_SET, ENABLED_FOCUSED_SELECTED_STATE_SET, ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_FOCUSED_STATE_SET, ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, ENABLED_SELECTED_STATE_SET, ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, ENABLED_STATE_SET, ENABLED_WINDOW_FOCUSED_STATE_SET, FIND_VIEWS_WITH_CONTENT_DESCRIPTION, FIND_VIEWS_WITH_TEXT, FOCUS_BACKWARD, FOCUS_DOWN, FOCUS_FORWARD, FOCUS_LEFT, FOCUS_RIGHT, FOCUS_UP, FOCUSABLES_ALL, FOCUSABLES_TOUCH_MODE, FOCUSED_SELECTED_STATE_SET, FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, FOCUSED_STATE_SET, FOCUSED_WINDOW_FOCUSED_STATE_SET, GONE, HAPTIC_FEEDBACK_ENABLED, IMPORTANT_FOR_ACCESSIBILITY_AUTO, IMPORTANT_FOR_ACCESSIBILITY_NO, IMPORTANT_FOR_ACCESSIBILITY_NO_HIDE_DESCENDANTS, IMPORTANT_FOR_ACCESSIBILITY_YES, INVISIBLE, KEEP_SCREEN_ON, LAYER_TYPE_HARDWARE, LAYER_TYPE_NONE, LAYER_TYPE_SOFTWARE, LAYOUT_DIRECTION_INHERIT, LAYOUT_DIRECTION_LOCALE, LAYOUT_DIRECTION_LTR, LAYOUT_DIRECTION_RTL, MEASURED_HEIGHT_STATE_SHIFT, MEASURED_SIZE_MASK, MEASURED_STATE_MASK, MEASURED_STATE_TOO_SMALL, NO_ID, OVER_SCROLL_ALWAYS, OVER_SCROLL_IF_CONTENT_SCROLLS, OVER_SCROLL_NEVER, PRESSED_ENABLED_FOCUSED_SELECTED_STATE_SET, PRESSED_ENABLED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_STATE_SET, PRESSED_ENABLED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_SELECTED_STATE_SET, PRESSED_ENABLED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_ENABLED_STATE_SET, PRESSED_ENABLED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_SELECTED_STATE_SET, PRESSED_FOCUSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_FOCUSED_STATE_SET, PRESSED_FOCUSED_WINDOW_FOCUSED_STATE_SET, PRESSED_SELECTED_STATE_SET, PRESSED_SELECTED_WINDOW_FOCUSED_STATE_SET, PRESSED_STATE_SET, PRESSED_WINDOW_FOCUSED_STATE_SET, ROTATION, ROTATION_X, ROTATION_Y, SCALE_X, SCALE_Y, SCREEN_STATE_OFF, SCREEN_STATE_ON, SCROLL_AXIS_HORIZONTAL, SCROLL_AXIS_NONE, SCROLL_AXIS_VERTICAL, SCROLL_INDICATOR_BOTTOM, SCROLL_INDICATOR_END, SCROLL_INDICATOR_LEFT, SCROLL_INDICATOR_RIGHT, SCROLL_INDICATOR_START, SCROLL_INDICATOR_TOP, SCROLLBAR_POSITION_DEFAULT, SCROLLBAR_POSITION_LEFT, SCROLLBAR_POSITION_RIGHT, SCROLLBARS_INSIDE_INSET, SCROLLBARS_INSIDE_OVERLAY, SCROLLBARS_OUTSIDE_INSET, SCROLLBARS_OUTSIDE_OVERLAY, SELECTED_STATE_SET, SELECTED_WINDOW_FOCUSED_STATE_SET, SOUND_EFFECTS_ENABLED, STATUS_BAR_HIDDEN, STATUS_BAR_VISIBLE, SYSTEM_UI_FLAG_FULLSCREEN, SYSTEM_UI_FLAG_HIDE_NAVIGATION, SYSTEM_UI_FLAG_IMMERSIVE, SYSTEM_UI_FLAG_IMMERSIVE_STICKY, SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN, SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION, SYSTEM_UI_FLAG_LAYOUT_STABLE, SYSTEM_UI_FLAG_LIGHT_STATUS_BAR, SYSTEM_UI_FLAG_LOW_PROFILE, SYSTEM_UI_FLAG_VISIBLE, SYSTEM_UI_LAYOUT_FLAGS, TEXT_ALIGNMENT_CENTER, TEXT_ALIGNMENT_GRAVITY, TEXT_ALIGNMENT_INHERIT, TEXT_ALIGNMENT_TEXT_END, TEXT_ALIGNMENT_TEXT_START, TEXT_ALIGNMENT_VIEW_END, TEXT_ALIGNMENT_VIEW_START, TEXT_DIRECTION_ANY_RTL, TEXT_DIRECTION_FIRST_STRONG, TEXT_DIRECTION_FIRST_STRONG_LTR, TEXT_DIRECTION_FIRST_STRONG_RTL, TEXT_DIRECTION_INHERIT, TEXT_DIRECTION_LOCALE, TEXT_DIRECTION_LTR, TEXT_DIRECTION_RTL, TRANSLATION_X, TRANSLATION_Y, TRANSLATION_Z, VIEW_LOG_TAG, VISIBLE, WINDOW_FOCUSED_STATE_SET, X, Y, Z| Constructor and Description |
|---|
BarLineChartBase(android.content.Context context) |
BarLineChartBase(android.content.Context context,
android.util.AttributeSet attrs) |
BarLineChartBase(android.content.Context context,
android.util.AttributeSet attrs,
int defStyle) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
calcMinMax()
calcualtes the y-min and y-max value and the y-delta and x-delta value
|
protected void |
calcModulus()
calculates the modulus for x-labels and grid
|
protected void |
calculateLegendOffsets(android.graphics.RectF offsets) |
void |
calculateOffsets()
calculates the offsets of the chart to the border depending on the
position of an eventual legend or depending on the length of the y-axis
and x-axis labels and their position
|
void |
centerViewTo(float xIndex,
float yValue,
YAxis.AxisDependency axis)
This will move the center of the current viewport to the specified
x-value and y-value.
|
void |
centerViewToAnimated(float xIndex,
float yValue,
YAxis.AxisDependency axis,
long duration)
This will move the center of the current viewport to the specified
x-value and y-value animated.
|
void |
computeScroll() |
protected void |
drawGridBackground(android.graphics.Canvas c)
draws the grid background
|
void |
fitScreen()
Resets all zooming and dragging and makes the chart fit exactly it's
bounds.
|
YAxis |
getAxis(YAxis.AxisDependency axis)
Returns the y-axis object to the corresponding AxisDependency.
|
YAxis |
getAxisLeft()
Returns the left y-axis object.
|
YAxis |
getAxisRight()
Returns the right y-axis object.
|
IBarLineScatterCandleBubbleDataSet |
getDataSetByTouchPoint(float x,
float y)
returns the DataSet object displayed at the touched position of the chart
|
float |
getDeltaY(YAxis.AxisDependency axis)
Returns the delta-y value (y-value range) of the specified axis.
|
OnDrawListener |
getDrawListener()
Gets the OnDrawListener.
|
Entry |
getEntryByTouchPoint(float x,
float y)
returns the Entry object displayed at the touched position of the chart
|
int |
getHighestVisibleXIndex()
Returns the highest x-index (value on the x-axis) that is still visible
on the chart.
|
Highlight |
getHighlightByTouchPoint(float x,
float y)
Returns the Highlight object (contains x-index and DataSet index) of the
selected value at the given touch point inside the Line-, Scatter-, or
CandleStick-Chart.
|
int |
getLowestVisibleXIndex()
Returns the lowest x-index (value on the x-axis) that is still visible on
the chart.
|
protected float[] |
getMarkerPosition(Entry e,
Highlight highlight)
Returns the actual position in pixels of the MarkerView for the given
Entry in the given DataSet.
|
int |
getMaxVisibleCount() |
float |
getMinOffset()
Gets the minimum offset (padding) around the chart, defaults to 15.f
|
android.graphics.Paint |
getPaint(int which)
Returns the paint object associated with the provided constant.
|
PointD |
getPixelsForValues(float x,
float y,
YAxis.AxisDependency axis)
Transforms the given chart values into pixels.
|
android.graphics.PointF |
getPosition(Entry e,
YAxis.AxisDependency axis)
Returns the position (in pixels) the provided Entry has inside the chart
view or null, if the provided Entry is null.
|
YAxisRenderer |
getRendererLeftYAxis() |
YAxisRenderer |
getRendererRightYAxis() |
XAxisRenderer |
getRendererXAxis() |
float |
getScaleX()
returns the current x-scale factor
|
float |
getScaleY()
returns the current y-scale factor
|
Transformer |
getTransformer(YAxis.AxisDependency which)
Returns the Transformer class that contains all matrices and is
responsible for transforming values into pixels on the screen and
backwards.
|
PointD |
getValuesByTouchPoint(float x,
float y,
YAxis.AxisDependency axis)
Returns the x and y values in the chart at the given touch point
(encapsulated in a PointD).
|
float |
getYChartMax()
Returns the maximum y-value of the chart, regardless of zoom or translation.
|
float |
getYChartMin()
Returns the minimum y-value of the chart, regardless of zoom or translation.
|
float |
getYValueByTouchPoint(float x,
float y,
YAxis.AxisDependency axis)
returns the y-value at the given touch position (must not necessarily be
a value contained in one of the datasets)
|
boolean |
hasNoDragOffset()
Returns true if both drag offsets (x and y) are zero or smaller.
|
protected void |
init()
initialize all paints and stuff
|
boolean |
isAnyAxisInverted()
Returns true if either the left or the right or both axes are inverted.
|
boolean |
isAutoScaleMinMaxEnabled() |
boolean |
isDoubleTapToZoomEnabled()
Returns true if zooming via double-tap is enabled false if not.
|
boolean |
isDragEnabled()
Returns true if dragging is enabled for the chart, false if not.
|
boolean |
isFullyZoomedOut()
if the chart is fully zoomed out, return true
|
boolean |
isHighlightFullBarEnabled() |
boolean |
isHighlightPerDragEnabled() |
boolean |
isInverted(YAxis.AxisDependency axis) |
boolean |
isKeepPositionOnRotation()
Returns true if keeping the position on rotation is enabled and false if not.
|
boolean |
isPinchZoomEnabled()
returns true if pinch-zoom is enabled, false if not
|
boolean |
isScaleXEnabled() |
boolean |
isScaleYEnabled() |
void |
moveViewTo(float xIndex,
float yValue,
YAxis.AxisDependency axis)
This will move the left side of the current viewport to the specified
x-value on the x-axis, and center the viewport to the specified y-value
on the y-axis.
|
void |
moveViewToAnimated(float xIndex,
float yValue,
YAxis.AxisDependency axis,
long duration)
This will move the left side of the current viewport to the specified x-position
and center the viewport to the specified y-position animated.
|
void |
moveViewToX(float xIndex)
Moves the left side of the current viewport to the specified x-index.
|
void |
moveViewToY(float yValue,
YAxis.AxisDependency axis)
Centers the viewport to the specified y-value on the y-axis.
|
void |
notifyDataSetChanged()
Lets the chart know its underlying data has changed and performs all
necessary recalculations.
|
protected void |
onDraw(android.graphics.Canvas canvas) |
protected void |
onSizeChanged(int w,
int h,
int oldw,
int oldh) |
boolean |
onTouchEvent(android.view.MotionEvent event) |
protected void |
prepareOffsetMatrix() |
protected void |
prepareValuePxMatrix() |
void |
resetTracking()
RESET PERFORMANCE TRACKING FIELDS
|
void |
resetViewPortOffsets()
Resets all custom offsets set via setViewPortOffsets(...) method.
|
void |
setAutoScaleMinMaxEnabled(boolean enabled)
Flag that indicates if auto scaling on the y axis is enabled.
|
void |
setBorderColor(int color)
Sets the color of the chart border lines.
|
void |
setBorderWidth(float width)
Sets the width of the border lines in dp.
|
void |
setDoubleTapToZoomEnabled(boolean enabled)
Set this to true to enable zooming in by double-tap on the chart.
|
void |
setDragEnabled(boolean enabled)
Set this to true to enable dragging (moving the chart with the finger)
for the chart (this does not effect scaling).
|
void |
setDragOffsetX(float offset)
Set an offset in dp that allows the user to drag the chart over it's
bounds on the x-axis.
|
void |
setDragOffsetY(float offset)
Set an offset in dp that allows the user to drag the chart over it's
bounds on the y-axis.
|
void |
setDrawBorders(boolean enabled)
Sets drawing the borders rectangle to true.
|
void |
setDrawGridBackground(boolean enabled)
set this to true to draw the grid background, false if not
|
void |
setGridBackgroundColor(int color)
Sets the color for the background of the chart-drawing area (everything
behind the grid lines).
|
void |
setHighlightFullBarEnabled(boolean enabled)
Set this to true to make the highlight full-bar oriented,
false to make it highlight single values
|
void |
setHighlightPerDragEnabled(boolean enabled)
Set this to true to allow highlighting per dragging over the chart
surface when it is fully zoomed out.
|
void |
setKeepPositionOnRotation(boolean keepPositionOnRotation)
Sets whether the chart should keep its position (zoom / scroll) after a rotation (orientation change)
|
void |
setMaxVisibleValueCount(int count)
sets the number of maximum visible drawn values on the chart only active
when setDrawValues() is enabled
|
void |
setMinOffset(float minOffset)
Sets the minimum offset (padding) around the chart, defaults to 15.f
|
void |
setOnDrawListener(OnDrawListener drawListener)
Sets the OnDrawListener
|
void |
setPaint(android.graphics.Paint p,
int which)
set a new paint object for the specified parameter in the chart e.g.
|
void |
setPinchZoom(boolean enabled)
If set to true, both x and y axis can be scaled simultaneously with 2 fingers, if false,
x and y axis can be scaled separately.
|
void |
setRendererLeftYAxis(YAxisRenderer rendererLeftYAxis)
Sets a custom axis renderer for the left axis and overwrites the existing one.
|
void |
setRendererRightYAxis(YAxisRenderer rendererRightYAxis)
Sets a custom axis renderer for the right acis and overwrites the existing one.
|
void |
setScaleEnabled(boolean enabled)
Set this to true to enable scaling (zooming in and out by gesture) for
the chart (this does not effect dragging) on both X- and Y-Axis.
|
void |
setScaleMinima(float scaleX,
float scaleY)
Sets the minimum scale factor value to which can be zoomed out.
|
void |
setScaleXEnabled(boolean enabled) |
void |
setScaleYEnabled(boolean enabled) |
void |
setViewPortOffsets(float left,
float top,
float right,
float bottom)
Sets custom offsets for the current ViewPort (the offsets on the sides of
the actual chart window).
|
void |
setVisibleXRange(float minXRange,
float maxXRange)
Limits the maximum and minimum value count that can be visible by
pinching and zooming.
|
void |
setVisibleXRangeMaximum(float maxXRange)
Sets the size of the area (range on the x-axis) that should be maximum
visible at once (no further zooming out allowed).
|
void |
setVisibleXRangeMinimum(float minXRange)
Sets the size of the area (range on the x-axis) that should be minimum
visible at once (no further zooming in allowed).
|
void |
setVisibleYRangeMaximum(float maxYRange,
YAxis.AxisDependency axis)
Sets the size of the area (range on the y-axis) that should be maximum
visible at once.
|
void |
setXAxisRenderer(XAxisRenderer xAxisRenderer)
Sets a custom XAxisRenderer and overrides the existing (default) one.
|
void |
zoom(float scaleX,
float scaleY,
float x,
float y)
Zooms in or out by the given scale factor.
|
void |
zoom(float scaleX,
float scaleY,
float xValue,
float yValue,
YAxis.AxisDependency axis)
Zooms in or out by the given scale factor.
|
void |
zoomAndCenterAnimated(float scaleX,
float scaleY,
float xValue,
float yValue,
YAxis.AxisDependency axis,
long duration)
Zooms by the specified scale factor to the specified values on the specified axis.
|
void |
zoomIn()
Zooms in by 1.4f, into the charts center.
|
void |
zoomOut()
Zooms out by 0.7f, from the charts center.
|
addViewportJob, animateX, animateX, animateX, animateXY, animateXY, animateXY, animateY, animateY, animateY, calculateFormatter, clear, clearAllViewportJobs, clearValues, disableScroll, drawDescription, drawMarkers, enableScroll, getAnimator, getCenter, getCenterOffsets, getCenterOfView, getChartBitmap, getContentRect, getData, getDefaultValueFormatter, getDragDecelerationFrictionCoef, getEntriesAtIndex, getExtraBottomOffset, getExtraLeftOffset, getExtraRightOffset, getExtraTopOffset, getHighlighted, getHighlighter, getJobs, getLegend, getLegendRenderer, getMarkerView, getOnChartGestureListener, getRenderer, getValueCount, getViewPortHandler, getXAxis, getXChartMax, getXChartMin, getXValCount, getXValue, getYMax, getYMin, highlightTouch, highlightValue, highlightValue, highlightValue, highlightValue, highlightValues, isDragDecelerationEnabled, isDrawMarkerViewEnabled, isEmpty, isHighlightPerTapEnabled, isLogEnabled, onDetachedFromWindow, onLayout, onMeasure, removeViewportJob, saveToGallery, saveToGallery, saveToPath, setData, setDescription, setDescriptionColor, setDescriptionPosition, setDescriptionTextSize, setDescriptionTypeface, setDragDecelerationEnabled, setDragDecelerationFrictionCoef, setDrawMarkerViews, setExtraBottomOffset, setExtraLeftOffset, setExtraOffsets, setExtraRightOffset, setExtraTopOffset, setHardwareAccelerationEnabled, setHighlighter, setHighlightPerTapEnabled, setLogEnabled, setMarkerView, setNoDataText, setNoDataTextDescription, setOnChartGestureListener, setOnChartValueSelectedListener, setOnTouchListener, setRenderer, setTouchEnabled, setUnbindEnabled, valuesToHighlightaddChildrenForAccessibility, addFocusables, addStatesFromChildren, addTouchables, addView, addView, addView, addView, addView, addViewInLayout, addViewInLayout, attachLayoutAnimationParameters, attachViewToParent, bringChildToFront, canAnimate, checkLayoutParams, childDrawableStateChanged, childHasTransientStateChanged, cleanupLayoutState, clearChildFocus, clearDisappearingChildren, clearFocus, debug, detachAllViewsFromParent, detachViewFromParent, detachViewFromParent, detachViewsFromParent, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchFreezeSelfOnly, dispatchGenericFocusedEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchThawSelfOnly, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, drawableStateChanged, drawChild, endViewTransition, findFocus, findViewsWithText, focusableViewAvailable, focusSearch, gatherTransparentRegion, generateDefaultLayoutParams, generateLayoutParams, generateLayoutParams, getAccessibilityClassName, getChildAt, getChildCount, getChildDrawingOrder, getChildMeasureSpec, getChildStaticTransformation, getChildVisibleRect, getClipChildren, getClipToPadding, getDescendantFocusability, getFocusedChild, getLayoutAnimation, getLayoutAnimationListener, getLayoutMode, getLayoutTransition, getNestedScrollAxes, getOverlay, getPersistentDrawingCache, getTouchscreenBlocksFocus, hasFocus, hasFocusable, hasTransientState, indexOfChild, invalidateChild, invalidateChildInParent, isAlwaysDrawnWithCacheEnabled, isAnimationCacheEnabled, isChildrenDrawingOrderEnabled, isChildrenDrawnWithCacheEnabled, isMotionEventSplittingEnabled, isTransitionGroup, jumpDrawablesToCurrentState, layout, measureChild, measureChildren, measureChildWithMargins, notifySubtreeAccessibilityStateChanged, offsetDescendantRectToMyCoords, offsetRectIntoDescendantCoords, onAttachedToWindow, onCreateDrawableState, onInterceptHoverEvent, onInterceptTouchEvent, onNestedFling, onNestedPreFling, onNestedPrePerformAccessibilityAction, onNestedPreScroll, onNestedScroll, onNestedScrollAccepted, onRequestFocusInDescendants, onRequestSendAccessibilityEvent, onStartNestedScroll, onStopNestedScroll, onViewAdded, onViewRemoved, recomputeViewAttributes, removeAllViews, removeAllViewsInLayout, removeDetachedView, removeView, removeViewAt, removeViewInLayout, removeViews, removeViewsInLayout, requestChildFocus, requestChildRectangleOnScreen, requestDisallowInterceptTouchEvent, requestFocus, requestSendAccessibilityEvent, requestTransparentRegion, scheduleLayoutAnimation, setAddStatesFromChildren, setAlwaysDrawnWithCacheEnabled, setAnimationCacheEnabled, setChildrenDrawingCacheEnabled, setChildrenDrawingOrderEnabled, setChildrenDrawnWithCacheEnabled, setClipChildren, setClipToPadding, setDescendantFocusability, setLayoutAnimation, setLayoutAnimationListener, setLayoutMode, setLayoutTransition, setMotionEventSplittingEnabled, setOnHierarchyChangeListener, setPersistentDrawingCache, setStaticTransformationsEnabled, setTouchscreenBlocksFocus, setTransitionGroup, shouldDelayChildPressedState, showContextMenuForChild, startActionModeForChild, startActionModeForChild, startLayoutAnimation, startViewTransition, updateViewLayoutaddFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchGenericMotionEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, draw, drawableHotspotChanged, findViewById, findViewWithTag, fitSystemWindows, focusSearch, forceLayout, generateViewId, getAccessibilityLiveRegion, getAccessibilityNodeProvider, getAccessibilityTraversalAfter, getAccessibilityTraversalBefore, getAlpha, getAnimation, getApplicationWindowToken, getBackground, getBackgroundTintList, getBackgroundTintMode, getBaseline, getBottom, getBottomFadingEdgeStrength, getBottomPaddingOffset, getCameraDistance, getClipBounds, getClipBounds, getClipToOutline, getContentDescription, getContext, getContextMenuInfo, getDefaultSize, getDisplay, getDrawableState, getDrawingCache, getDrawingCache, getDrawingCacheBackgroundColor, getDrawingCacheQuality, getDrawingRect, getDrawingTime, getElevation, getFilterTouchesWhenObscured, getFitsSystemWindows, getFocusables, getFocusedRect, getForeground, getForegroundGravity, getForegroundTintList, getForegroundTintMode, getGlobalVisibleRect, getGlobalVisibleRect, getHandler, getHeight, getHitRect, getHorizontalFadingEdgeLength, getHorizontalScrollbarHeight, getId, getImportantForAccessibility, getKeepScreenOn, getKeyDispatcherState, getLabelFor, getLayerType, getLayoutDirection, getLayoutParams, getLeft, getLeftFadingEdgeStrength, getLeftPaddingOffset, getLocalVisibleRect, getLocationInWindow, getLocationOnScreen, getMatrix, getMeasuredHeight, getMeasuredHeightAndState, getMeasuredState, getMeasuredWidth, getMeasuredWidthAndState, getMinimumHeight, getMinimumWidth, getNextFocusDownId, getNextFocusForwardId, getNextFocusLeftId, getNextFocusRightId, getNextFocusUpId, getOnFocusChangeListener, getOutlineProvider, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScrollBarDefaultDelayBeforeFade, getScrollBarFadeDuration, getScrollBarSize, getScrollBarStyle, getScrollIndicators, getScrollX, getScrollY, getSolidColor, getStateListAnimator, getSuggestedMinimumHeight, getSuggestedMinimumWidth, getSystemUiVisibility, getTag, getTag, getTextAlignment, getTextDirection, getTop, getTopFadingEdgeStrength, getTopPaddingOffset, getTouchables, getTouchDelegate, getTransitionName, getTranslationX, getTranslationY, getTranslationZ, getVerticalFadingEdgeLength, getVerticalScrollbarPosition, getVerticalScrollbarWidth, getViewTreeObserver, getVisibility, getWidth, getWindowAttachCount, getWindowId, getWindowSystemUiVisibility, getWindowToken, getWindowVisibility, getWindowVisibleDisplayFrame, getX, getY, getZ, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasWindowFocus, inflate, invalidate, invalidate, invalidate, invalidateDrawable, invalidateOutline, isAccessibilityFocused, isActivated, isAttachedToWindow, isClickable, isContextClickable, isDirty, isDrawingCacheEnabled, isDuplicateParentStateEnabled, isEnabled, isFocusable, isFocusableInTouchMode, isFocused, isHapticFeedbackEnabled, isHardwareAccelerated, isHorizontalFadingEdgeEnabled, isHorizontalScrollBarEnabled, isHovered, isImportantForAccessibility, isInEditMode, isInLayout, isInTouchMode, isLaidOut, isLayoutDirectionResolved, isLayoutRequested, isLongClickable, isNestedScrollingEnabled, isOpaque, isPaddingOffsetRequired, isPaddingRelative, isPressed, isSaveEnabled, isSaveFromParentEnabled, isScrollbarFadingEnabled, isScrollContainer, isSelected, isShown, isSoundEffectsEnabled, isTextAlignmentResolved, isTextDirectionResolved, isVerticalFadingEdgeEnabled, isVerticalScrollBarEnabled, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onCancelPendingInputEvents, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateInputConnection, onDisplayHint, onDragEvent, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onOverScrolled, onPopulateAccessibilityEvent, onProvideStructure, onProvideVirtualStructure, onRestoreInstanceState, onRtlPropertiesChanged, onSaveInstanceState, onScreenStateChanged, onScrollChanged, onSetAlpha, onStartTemporaryDetach, onTrackballEvent, onVisibilityChanged, onWindowFocusChanged, onWindowSystemUiVisibilityChanged, onWindowVisibilityChanged, overScrollBy, performAccessibilityAction, performClick, performContextClick, performHapticFeedback, performHapticFeedback, performLongClick, playSoundEffect, post, postDelayed, postInvalidate, postInvalidate, postInvalidateDelayed, postInvalidateDelayed, postInvalidateOnAnimation, postInvalidateOnAnimation, postOnAnimation, postOnAnimationDelayed, refreshDrawableState, removeCallbacks, removeOnAttachStateChangeListener, removeOnLayoutChangeListener, requestApplyInsets, requestFitSystemWindows, requestFocus, requestFocus, requestFocusFromTouch, requestLayout, requestRectangleOnScreen, requestRectangleOnScreen, requestUnbufferedDispatch, resolveSize, resolveSizeAndState, restoreHierarchyState, saveHierarchyState, scheduleDrawable, scrollBy, scrollTo, sendAccessibilityEvent, sendAccessibilityEventUnchecked, setAccessibilityDelegate, setAccessibilityLiveRegion, setAccessibilityTraversalAfter, setAccessibilityTraversalBefore, setActivated, setAlpha, setAnimation, setBackground, setBackgroundColor, setBackgroundDrawable, setBackgroundResource, setBackgroundTintList, setBackgroundTintMode, setBottom, setCameraDistance, setClickable, setClipBounds, setClipToOutline, setContentDescription, setContextClickable, setDrawingCacheBackgroundColor, setDrawingCacheEnabled, setDrawingCacheQuality, setDuplicateParentStateEnabled, setElevation, setEnabled, setFadingEdgeLength, setFilterTouchesWhenObscured, setFitsSystemWindows, setFocusable, setFocusableInTouchMode, setForeground, setForegroundGravity, setForegroundTintList, setForegroundTintMode, setHapticFeedbackEnabled, setHasTransientState, setHorizontalFadingEdgeEnabled, setHorizontalScrollBarEnabled, setHovered, setId, setImportantForAccessibility, setKeepScreenOn, setLabelFor, setLayerPaint, setLayerType, setLayoutDirection, setLayoutParams, setLeft, setLongClickable, setMeasuredDimension, setMinimumHeight, setMinimumWidth, setNestedScrollingEnabled, setNextFocusDownId, setNextFocusForwardId, setNextFocusLeftId, setNextFocusRightId, setNextFocusUpId, setOnApplyWindowInsetsListener, setOnClickListener, setOnContextClickListener, setOnCreateContextMenuListener, setOnDragListener, setOnFocusChangeListener, setOnGenericMotionListener, setOnHoverListener, setOnKeyListener, setOnLongClickListener, setOnScrollChangeListener, setOnSystemUiVisibilityChangeListener, setOnTouchListener, setOutlineProvider, setOverScrollMode, setPadding, setPaddingRelative, setPivotX, setPivotY, setPressed, setRight, setRotation, setRotationX, setRotationY, setSaveEnabled, setSaveFromParentEnabled, setScaleX, setScaleY, setScrollBarDefaultDelayBeforeFade, setScrollBarFadeDuration, setScrollbarFadingEnabled, setScrollBarSize, setScrollBarStyle, setScrollContainer, setScrollIndicators, setScrollIndicators, setScrollX, setScrollY, setSelected, setSoundEffectsEnabled, setStateListAnimator, setSystemUiVisibility, setTag, setTag, setTextAlignment, setTextDirection, setTop, setTouchDelegate, setTransitionName, setTranslationX, setTranslationY, setTranslationZ, setVerticalFadingEdgeEnabled, setVerticalScrollBarEnabled, setVerticalScrollbarPosition, setVisibility, setWillNotCacheDrawing, setWillNotDraw, setX, setY, setZ, showContextMenu, startActionMode, startActionMode, startAnimation, startDrag, startNestedScroll, stopNestedScroll, toString, unscheduleDrawable, unscheduleDrawable, verifyDrawable, willNotCacheDrawing, willNotDrawclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDatagetCenterOffsets, getCenterOfView, getContentRect, getDefaultValueFormatter, getHeight, getWidth, getXChartMax, getXChartMin, getXValCountcanResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, createContextMenu, getLayoutDirection, getParent, getParentForAccessibility, getTextAlignment, getTextDirection, isLayoutDirectionResolved, isLayoutRequested, isTextAlignmentResolved, isTextDirectionResolved, requestFitSystemWindows, requestLayoutprotected int mMaxVisibleCount
protected boolean mPinchZoomEnabled
protected boolean mDoubleTapToZoomEnabled
protected boolean mHighlightPerDragEnabled
protected boolean mHighlightFullBarEnabled
protected android.graphics.Paint mGridBackgroundPaint
protected android.graphics.Paint mBorderPaint
protected boolean mDrawGridBackground
protected boolean mDrawBorders
protected float mMinOffset
protected boolean mKeepPositionOnRotation
protected OnDrawListener mDrawListener
protected YAxis mAxisLeft
protected YAxis mAxisRight
protected YAxisRenderer mAxisRendererLeft
protected YAxisRenderer mAxisRendererRight
protected Transformer mLeftAxisTransformer
protected Transformer mRightAxisTransformer
protected XAxisRenderer mXAxisRenderer
public BarLineChartBase(android.content.Context context,
android.util.AttributeSet attrs,
int defStyle)
public BarLineChartBase(android.content.Context context,
android.util.AttributeSet attrs)
public BarLineChartBase(android.content.Context context)
protected void init()
Chartinit in class Chart<T extends BarLineScatterCandleBubbleData<? extends IBarLineScatterCandleBubbleDataSet<? extends Entry>>>protected void onDraw(android.graphics.Canvas canvas)
onDraw in class Chart<T extends BarLineScatterCandleBubbleData<? extends IBarLineScatterCandleBubbleDataSet<? extends Entry>>>public void resetTracking()
protected void prepareValuePxMatrix()
protected void prepareOffsetMatrix()
public void notifyDataSetChanged()
ChartnotifyDataSetChanged in class Chart<T extends BarLineScatterCandleBubbleData<? extends IBarLineScatterCandleBubbleDataSet<? extends Entry>>>protected void calcMinMax()
ChartcalcMinMax in class Chart<T extends BarLineScatterCandleBubbleData<? extends IBarLineScatterCandleBubbleDataSet<? extends Entry>>>protected void calculateLegendOffsets(android.graphics.RectF offsets)
public void calculateOffsets()
ChartcalculateOffsets in class Chart<T extends BarLineScatterCandleBubbleData<? extends IBarLineScatterCandleBubbleDataSet<? extends Entry>>>protected void calcModulus()
protected float[] getMarkerPosition(Entry e, Highlight highlight)
ChartgetMarkerPosition in class Chart<T extends BarLineScatterCandleBubbleData<? extends IBarLineScatterCandleBubbleDataSet<? extends Entry>>>protected void drawGridBackground(android.graphics.Canvas c)
public Transformer getTransformer(YAxis.AxisDependency which)
getTransformer in interface BarLineScatterCandleBubbleDataProviderpublic boolean onTouchEvent(android.view.MotionEvent event)
onTouchEvent in class android.view.Viewpublic void computeScroll()
computeScroll in class android.view.Viewpublic void zoomIn()
public void zoomOut()
public void zoom(float scaleX,
float scaleY,
float x,
float y)
scaleX - if < 1f --> zoom out, if > 1f --> zoom inscaleY - if < 1f --> zoom out, if > 1f --> zoom inx - y - public void zoom(float scaleX,
float scaleY,
float xValue,
float yValue,
YAxis.AxisDependency axis)
scaleX - scaleY - xValue - yValue - axis - the axis relative to which the zoom should take placepublic void zoomAndCenterAnimated(float scaleX,
float scaleY,
float xValue,
float yValue,
YAxis.AxisDependency axis,
long duration)
scaleX - scaleY - xValue - yValue - axis - duration - public void fitScreen()
public void setScaleMinima(float scaleX,
float scaleY)
scaleX - scaleY - public void setVisibleXRangeMaximum(float maxXRange)
maxXRange - The maximum visible range of x-values.public void setVisibleXRangeMinimum(float minXRange)
minXRange - The minimum visible range of x-values.public void setVisibleXRange(float minXRange,
float maxXRange)
minXRange - maxXRange - public void setVisibleYRangeMaximum(float maxYRange,
YAxis.AxisDependency axis)
maxYRange - the maximum visible range on the y-axisaxis - - the axis for which this limit should applypublic void moveViewToX(float xIndex)
xIndex - public void moveViewToY(float yValue,
YAxis.AxisDependency axis)
yValue - axis - - which axis should be used as a reference for the y-axispublic void moveViewTo(float xIndex,
float yValue,
YAxis.AxisDependency axis)
xIndex - yValue - axis - - which axis should be used as a reference for the y-axispublic void moveViewToAnimated(float xIndex,
float yValue,
YAxis.AxisDependency axis,
long duration)
xIndex - yValue - axis - duration - the duration of the animation in millisecondspublic void centerViewTo(float xIndex,
float yValue,
YAxis.AxisDependency axis)
xIndex - yValue - axis - - which axis should be used as a reference for the y-axispublic void centerViewToAnimated(float xIndex,
float yValue,
YAxis.AxisDependency axis,
long duration)
xIndex - yValue - axis - duration - the duration of the animation in millisecondspublic void setViewPortOffsets(float left,
float top,
float right,
float bottom)
left - top - right - bottom - public void resetViewPortOffsets()
public float getDeltaY(YAxis.AxisDependency axis)
axis - public void setOnDrawListener(OnDrawListener drawListener)
drawListener - public OnDrawListener getDrawListener()
public android.graphics.PointF getPosition(Entry e, YAxis.AxisDependency axis)
e - public void setMaxVisibleValueCount(int count)
count - public int getMaxVisibleCount()
getMaxVisibleCount in interface BarLineScatterCandleBubbleDataProviderpublic void setHighlightPerDragEnabled(boolean enabled)
enabled - public boolean isHighlightPerDragEnabled()
public void setHighlightFullBarEnabled(boolean enabled)
enabled - public boolean isHighlightFullBarEnabled()
public void setGridBackgroundColor(int color)
color - public void setDragEnabled(boolean enabled)
enabled - public boolean isDragEnabled()
public void setScaleEnabled(boolean enabled)
enabled - public void setScaleXEnabled(boolean enabled)
public void setScaleYEnabled(boolean enabled)
public boolean isScaleXEnabled()
public boolean isScaleYEnabled()
public void setDoubleTapToZoomEnabled(boolean enabled)
enabled - public boolean isDoubleTapToZoomEnabled()
public void setDrawGridBackground(boolean enabled)
enabled - public void setDrawBorders(boolean enabled)
enabled - public void setBorderWidth(float width)
width - public void setBorderColor(int color)
color - public float getMinOffset()
public void setMinOffset(float minOffset)
public boolean isKeepPositionOnRotation()
public void setKeepPositionOnRotation(boolean keepPositionOnRotation)
public Highlight getHighlightByTouchPoint(float x, float y)
x - y - public PointD getValuesByTouchPoint(float x, float y, YAxis.AxisDependency axis)
x - y - public PointD getPixelsForValues(float x, float y, YAxis.AxisDependency axis)
x - y - public float getYValueByTouchPoint(float x,
float y,
YAxis.AxisDependency axis)
x - y - public Entry getEntryByTouchPoint(float x, float y)
x - y - public IBarLineScatterCandleBubbleDataSet getDataSetByTouchPoint(float x, float y)
x - y - public int getLowestVisibleXIndex()
getLowestVisibleXIndex in interface BarLineScatterCandleBubbleDataProviderpublic int getHighestVisibleXIndex()
getHighestVisibleXIndex in interface BarLineScatterCandleBubbleDataProviderpublic float getScaleX()
getScaleX in class android.view.Viewpublic float getScaleY()
getScaleY in class android.view.Viewpublic boolean isFullyZoomedOut()
public YAxis getAxisLeft()
public YAxis getAxisRight()
public YAxis getAxis(YAxis.AxisDependency axis)
axis - public boolean isInverted(YAxis.AxisDependency axis)
isInverted in interface BarLineScatterCandleBubbleDataProviderpublic void setPinchZoom(boolean enabled)
enabled - public boolean isPinchZoomEnabled()
public void setDragOffsetX(float offset)
offset - public void setDragOffsetY(float offset)
offset - public boolean hasNoDragOffset()
public XAxisRenderer getRendererXAxis()
public void setXAxisRenderer(XAxisRenderer xAxisRenderer)
xAxisRenderer - public YAxisRenderer getRendererLeftYAxis()
public void setRendererLeftYAxis(YAxisRenderer rendererLeftYAxis)
rendererLeftYAxis - public YAxisRenderer getRendererRightYAxis()
public void setRendererRightYAxis(YAxisRenderer rendererRightYAxis)
rendererRightYAxis - public float getYChartMax()
ChartInterfacegetYChartMax in interface ChartInterfacepublic float getYChartMin()
ChartInterfacegetYChartMin in interface ChartInterfacepublic boolean isAnyAxisInverted()
public void setAutoScaleMinMaxEnabled(boolean enabled)
enabled - the y axis automatically adjusts to the min and max y
values of the current x axis range whenever the viewport
changespublic boolean isAutoScaleMinMaxEnabled()
public void setPaint(android.graphics.Paint p,
int which)
ChartsetPaint in class Chart<T extends BarLineScatterCandleBubbleData<? extends IBarLineScatterCandleBubbleDataSet<? extends Entry>>>p - the new paint objectwhich - Chart.PAINT_VALUES, Chart.PAINT_GRID, Chart.PAINT_VALUES,
...public android.graphics.Paint getPaint(int which)
ChartgetPaint in class Chart<T extends BarLineScatterCandleBubbleData<? extends IBarLineScatterCandleBubbleDataSet<? extends Entry>>>which - e.g. Chart.PAINT_LEGEND_LABELprotected void onSizeChanged(int w,
int h,
int oldw,
int oldh)
onSizeChanged in class Chart<T extends BarLineScatterCandleBubbleData<? extends IBarLineScatterCandleBubbleDataSet<? extends Entry>>>