public abstract class AbstractChartView extends android.view.View implements Chart
android.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 AxesRenderer |
axesRenderer |
protected ChartComputator |
chartComputator |
protected ChartRenderer |
chartRenderer |
protected ContainerScrollType |
containerScrollType |
protected ChartDataAnimator |
dataAnimator |
protected boolean |
isContainerScrollEnabled |
protected boolean |
isInteractive |
protected ChartTouchHandler |
touchHandler |
protected ChartViewportAnimator |
viewportAnimator |
ACCESSIBILITY_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 |
|---|
AbstractChartView(android.content.Context context) |
AbstractChartView(android.content.Context context,
android.util.AttributeSet attrs) |
AbstractChartView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr) |
| Modifier and Type | Method and Description |
|---|---|
void |
animationDataFinished()
Called when data animation finished.
|
void |
animationDataUpdate(float scale)
Updates chart data with given scale.
|
void |
cancelDataAnimation()
Stops chart data animation.
|
void |
computeScroll() |
AxesRenderer |
getAxesRenderer() |
ChartComputator |
getChartComputator() |
ChartRenderer |
getChartRenderer() |
Viewport |
getCurrentViewport()
Returns current viewport.
|
Viewport |
getMaximumViewport()
Returns maximum viewport for this chart.
|
float |
getMaxZoom()
Returns current maximum zoom value.
|
SelectedValue |
getSelectedValue()
Return currently selected value indexes.
|
ChartTouchHandler |
getTouchHandler() |
float |
getZoomLevel()
Returns current zoom level.
|
ZoomType |
getZoomType()
Returns current zoom type for this chart.
|
boolean |
isContainerScrollEnabled() |
boolean |
isInteractive()
Returns true if chart is interactive.
|
boolean |
isScrollEnabled()
Returns true if scrolling is enabled.
|
boolean |
isValueSelectionEnabled()
Return true if value selection mode is enabled.
|
boolean |
isValueTouchEnabled()
Return true if chart value can be touched.
|
boolean |
isViewportCalculationEnabled()
Return true if auto viewports recalculations are enabled, false otherwise.
|
boolean |
isZoomEnabled()
Returns true if pitch to zoom and double tap zoom is enabled.
|
void |
moveTo(float x,
float y)
Move/Srcoll viewport to position x,y(that position must be within maximum chart viewport).
|
void |
moveToWithAnimation(float x,
float y)
Animate viewport to position x,y(that position must be within maximum chart viewport).
|
protected void |
onChartDataChange() |
protected void |
onDraw(android.graphics.Canvas canvas) |
protected void |
onMeasure(int widthMeasureSpec,
int heightMeasureSpec) |
protected void |
onSizeChanged(int width,
int height,
int oldWidth,
int oldHeight) |
boolean |
onTouchEvent(android.view.MotionEvent event) |
protected void |
resetRendererAndTouchHandler()
You should call this method in derived classes, most likely from constructor if you changed chart/axis renderer,
touch handler or chart computator
|
void |
resetViewports()
Reset maximum viewport and current viewport.
|
void |
selectValue(SelectedValue selectedValue)
Select single value on chart.
|
void |
setChartRenderer(ChartRenderer renderer) |
void |
setContainerScrollEnabled(boolean isContainerScrollEnabled,
ContainerScrollType containerScrollType)
Set isContainerScrollEnabled to true and containerScrollType to HORIZONTAL or VERTICAL if you are using chart
within scroll container.
|
void |
setCurrentViewport(Viewport targetViewport)
Sets current viewport.
|
void |
setCurrentViewportWithAnimation(Viewport targetViewport)
Sets current viewport with animation.
|
void |
setCurrentViewportWithAnimation(Viewport targetViewport,
long duration)
Sets current viewport with animation.
|
void |
setDataAnimationListener(ChartAnimationListener animationListener)
Set listener for data animation to be notified when data animation started and finished.
|
void |
setInteractive(boolean isInteractive)
Set true to allow user use touch gestures.
|
void |
setMaximumViewport(Viewport maxViewport)
Set maximum viewport.
|
void |
setMaxZoom(float maxZoom)
Set max zoom value.
|
void |
setScrollEnabled(boolean isScrollEnabled)
Set true to enable touch scroll/fling, false to disable touch scroll/fling, by default true;
|
void |
setValueSelectionEnabled(boolean isValueSelectionEnabled)
Set true if you want value selection with touch - value will stay selected until you touch somewhere else on the
chart area.
|
void |
setValueTouchEnabled(boolean isValueTouchEnabled)
Set true if you want allow user to click value on chart, set false to disable that option.
|
void |
setViewportAnimationListener(ChartAnimationListener animationListener)
Set listener for viewport animation to be notified when viewport animation started and finished.
|
void |
setViewportCalculationEnabled(boolean isEnabled)
Set true to enable viewports(max and current) recalculations during animations or after set*ChartData method is
called.
|
void |
setViewportChangeListener(ViewportChangeListener viewportChangeListener)
Set listener for current viewport changes.
|
void |
setZoomEnabled(boolean isZoomEnabled)
Set true to enable zoom, false to disable, by default true;
|
void |
setZoomLevel(float x,
float y,
float zoomLevel)
Programatically zoom chart to given point(viewport point).
|
void |
setZoomLevelWithAnimation(float x,
float y,
float zoomLevel)
Programatically zoom chart to given point(viewport point) with animation.
|
void |
setZoomType(ZoomType zoomType)
Set zoom type, available options: ZoomType.HORIZONTAL_AND_VERTICAL, ZoomType.HORIZONTAL, ZoomType.VERTICAL.
|
void |
startDataAnimation()
Starts chart data animation for given duration.
|
void |
startDataAnimation(long duration)
Starts chart data animation for given duration.
|
addChildrenForAccessibility, addFocusables, addFocusables, addOnAttachStateChangeListener, addOnLayoutChangeListener, addTouchables, animate, announceForAccessibility, awakenScrollBars, awakenScrollBars, awakenScrollBars, bringToFront, buildDrawingCache, buildDrawingCache, buildLayer, callOnClick, cancelLongPress, cancelPendingInputEvents, canResolveLayoutDirection, canResolveTextAlignment, canResolveTextDirection, canScrollHorizontally, canScrollVertically, checkInputConnectionProxy, clearAnimation, clearFocus, combineMeasuredStates, computeHorizontalScrollExtent, computeHorizontalScrollOffset, computeHorizontalScrollRange, computeSystemWindowInsets, computeVerticalScrollExtent, computeVerticalScrollOffset, computeVerticalScrollRange, createAccessibilityNodeInfo, createContextMenu, destroyDrawingCache, dispatchApplyWindowInsets, dispatchConfigurationChanged, dispatchDisplayHint, dispatchDragEvent, dispatchDraw, dispatchDrawableHotspotChanged, dispatchGenericFocusedEvent, dispatchGenericMotionEvent, dispatchGenericPointerEvent, dispatchHoverEvent, dispatchKeyEvent, dispatchKeyEventPreIme, dispatchKeyShortcutEvent, dispatchNestedFling, dispatchNestedPreFling, dispatchNestedPrePerformAccessibilityAction, dispatchNestedPreScroll, dispatchNestedScroll, dispatchPopulateAccessibilityEvent, dispatchProvideStructure, dispatchRestoreInstanceState, dispatchSaveInstanceState, dispatchSetActivated, dispatchSetPressed, dispatchSetSelected, dispatchSystemUiVisibilityChanged, dispatchTouchEvent, dispatchTrackballEvent, dispatchUnhandledMove, dispatchVisibilityChanged, dispatchWindowFocusChanged, dispatchWindowSystemUiVisiblityChanged, dispatchWindowVisibilityChanged, draw, drawableHotspotChanged, drawableStateChanged, findFocus, findViewById, findViewsWithText, findViewWithTag, fitSystemWindows, focusSearch, forceLayout, generateViewId, getAccessibilityClassName, 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, getOverlay, getOverScrollMode, getPaddingBottom, getPaddingEnd, getPaddingLeft, getPaddingRight, getPaddingStart, getPaddingTop, getParent, getParentForAccessibility, getPivotX, getPivotY, getResources, getRight, getRightFadingEdgeStrength, getRightPaddingOffset, getRootView, getRootWindowInsets, getRotation, getRotationX, getRotationY, getScaleX, getScaleY, 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, hasFocus, hasFocusable, hasNestedScrollingParent, hasOnClickListeners, hasOverlappingRendering, hasTransientState, 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, jumpDrawablesToCurrentState, layout, measure, mergeDrawableStates, offsetLeftAndRight, offsetTopAndBottom, onAnimationEnd, onAnimationStart, onApplyWindowInsets, onAttachedToWindow, onCancelPendingInputEvents, onCheckIsTextEditor, onConfigurationChanged, onCreateContextMenu, onCreateDrawableState, onCreateInputConnection, onDetachedFromWindow, onDisplayHint, onDragEvent, onDrawForeground, onDrawScrollBars, onFilterTouchEventForSecurity, onFinishInflate, onFinishTemporaryDetach, onFocusChanged, onGenericMotionEvent, onHoverChanged, onHoverEvent, onInitializeAccessibilityEvent, onInitializeAccessibilityNodeInfo, onKeyDown, onKeyLongPress, onKeyMultiple, onKeyPreIme, onKeyShortcut, onKeyUp, onLayout, 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, 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, waitcallTouchListener, getChartDataprotected ChartComputator chartComputator
protected AxesRenderer axesRenderer
protected ChartTouchHandler touchHandler
protected ChartRenderer chartRenderer
protected ChartDataAnimator dataAnimator
protected ChartViewportAnimator viewportAnimator
protected boolean isInteractive
protected boolean isContainerScrollEnabled
protected ContainerScrollType containerScrollType
public AbstractChartView(android.content.Context context)
public AbstractChartView(android.content.Context context,
android.util.AttributeSet attrs)
public AbstractChartView(android.content.Context context,
android.util.AttributeSet attrs,
int defStyleAttr)
protected void onMeasure(int widthMeasureSpec,
int heightMeasureSpec)
onMeasure in class android.view.Viewprotected void onSizeChanged(int width,
int height,
int oldWidth,
int oldHeight)
onSizeChanged in class android.view.Viewprotected void onDraw(android.graphics.Canvas canvas)
onDraw in class android.view.Viewpublic boolean onTouchEvent(android.view.MotionEvent event)
onTouchEvent in class android.view.Viewpublic void computeScroll()
computeScroll in class android.view.Viewpublic void startDataAnimation()
ChartstartDataAnimation in interface Chartpublic void startDataAnimation(long duration)
ChartstartDataAnimation in interface Chartpublic void cancelDataAnimation()
ChartcancelDataAnimation in interface Chartpublic void animationDataUpdate(float scale)
ChartanimationDataUpdate in interface Chartpublic void animationDataFinished()
ChartanimationDataFinished in interface Chartpublic void setDataAnimationListener(ChartAnimationListener animationListener)
ChartsetDataAnimationListener in interface Chartpublic void setViewportAnimationListener(ChartAnimationListener animationListener)
ChartsetViewportAnimationListener in interface Chartpublic void setViewportChangeListener(ViewportChangeListener viewportChangeListener)
ChartsetViewportChangeListener in interface Chartpublic ChartRenderer getChartRenderer()
getChartRenderer in interface Chartpublic void setChartRenderer(ChartRenderer renderer)
setChartRenderer in interface Chartpublic AxesRenderer getAxesRenderer()
getAxesRenderer in interface Chartpublic ChartComputator getChartComputator()
getChartComputator in interface Chartpublic ChartTouchHandler getTouchHandler()
getTouchHandler in interface Chartpublic boolean isInteractive()
ChartisInteractive in interface ChartChart.setInteractive(boolean)public void setInteractive(boolean isInteractive)
ChartsetInteractive in interface Chartpublic boolean isZoomEnabled()
ChartisZoomEnabled in interface ChartChart.setZoomEnabled(boolean)public void setZoomEnabled(boolean isZoomEnabled)
ChartsetZoomEnabled in interface Chartpublic boolean isScrollEnabled()
ChartisScrollEnabled in interface ChartChart.setScrollEnabled(boolean)public void setScrollEnabled(boolean isScrollEnabled)
ChartsetScrollEnabled in interface Chartpublic void moveTo(float x,
float y)
ChartmoveTo in interface ChartChart.setCurrentViewport(lecho.lib.hellocharts.model.Viewport)public void moveToWithAnimation(float x,
float y)
ChartmoveToWithAnimation in interface Chart;public boolean isValueTouchEnabled()
ChartisValueTouchEnabled in interface ChartChart.setValueTouchEnabled(boolean)public void setValueTouchEnabled(boolean isValueTouchEnabled)
ChartsetValueTouchEnabled in interface Chartpublic ZoomType getZoomType()
ChartgetZoomType in interface ChartChart.setZoomType(ZoomType)public void setZoomType(ZoomType zoomType)
ChartsetZoomType in interface Chartpublic float getMaxZoom()
ChartgetMaxZoom in interface Chartpublic void setMaxZoom(float maxZoom)
ChartsetMaxZoom in interface Chartpublic float getZoomLevel()
ChartgetZoomLevel in interface Chartpublic void setZoomLevel(float x,
float y,
float zoomLevel)
ChartsetZoomLevel in interface Chartx - x within chart maximum viewporty - y within chart maximum viewportzoomLevel - value from 1 to maxZoom(default 20). 1 means chart has no zoom.public void setZoomLevelWithAnimation(float x,
float y,
float zoomLevel)
ChartsetZoomLevelWithAnimation in interface Chartx - x within chart maximum viewporty - y within chart maximum viewportzoomLevel - value from 1 to maxZoom(default 20). 1 means chart has no zoom.public Viewport getMaximumViewport()
ChartChart.setMaximumViewport(Viewport)
instead.getMaximumViewport in interface ChartChart.setMaximumViewport(Viewport)public void setMaximumViewport(Viewport maxViewport)
ChartsetMaximumViewport in interface Chartpublic void setCurrentViewportWithAnimation(Viewport targetViewport)
ChartsetCurrentViewportWithAnimation in interface Chartpublic void setCurrentViewportWithAnimation(Viewport targetViewport, long duration)
ChartsetCurrentViewportWithAnimation in interface Chartpublic Viewport getCurrentViewport()
ChartChart.setCurrentViewport(Viewport) instead.getCurrentViewport in interface ChartChart.setCurrentViewport(Viewport)public void setCurrentViewport(Viewport targetViewport)
ChartsetCurrentViewport in interface Chartpublic void resetViewports()
ChartresetViewports in interface Chartpublic boolean isViewportCalculationEnabled()
ChartisViewportCalculationEnabled in interface Chartpublic void setViewportCalculationEnabled(boolean isEnabled)
ChartsetViewportCalculationEnabled in interface Chartpublic boolean isValueSelectionEnabled()
ChartisValueSelectionEnabled in interface ChartChart.setValueSelectionEnabled(boolean)public void setValueSelectionEnabled(boolean isValueSelectionEnabled)
ChartsetValueSelectionEnabled in interface Chartpublic void selectValue(SelectedValue selectedValue)
ChartselectValue in interface Chartpublic SelectedValue getSelectedValue()
ChartgetSelectedValue in interface Chartpublic boolean isContainerScrollEnabled()
isContainerScrollEnabled in interface ChartChart.setContainerScrollEnabled(boolean, ContainerScrollType)public void setContainerScrollEnabled(boolean isContainerScrollEnabled,
ContainerScrollType containerScrollType)
ChartsetContainerScrollEnabled in interface Chartprotected void onChartDataChange()
protected void resetRendererAndTouchHandler()