public interface Chart
| Modifier and Type | Method and Description |
|---|---|
void |
animationDataFinished()
Called when data animation finished.
|
void |
animationDataUpdate(float scale)
Updates chart data with given scale.
|
void |
callTouchListener() |
void |
cancelDataAnimation()
Stops chart data animation.
|
AxesRenderer |
getAxesRenderer() |
ChartComputator |
getChartComputator() |
ChartData |
getChartData()
Returns generic chart data.
|
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).
|
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.
|
ChartData getChartData()
ChartRenderer getChartRenderer()
void setChartRenderer(ChartRenderer renderer)
AxesRenderer getAxesRenderer()
ChartComputator getChartComputator()
ChartTouchHandler getTouchHandler()
void animationDataUpdate(float scale)
void animationDataFinished()
void startDataAnimation()
void startDataAnimation(long duration)
void cancelDataAnimation()
boolean isViewportCalculationEnabled()
void setViewportCalculationEnabled(boolean isEnabled)
void setDataAnimationListener(ChartAnimationListener animationListener)
void setViewportAnimationListener(ChartAnimationListener animationListener)
void setViewportChangeListener(ViewportChangeListener viewportChangeListener)
void callTouchListener()
boolean isInteractive()
setInteractive(boolean)void setInteractive(boolean isInteractive)
boolean isZoomEnabled()
setZoomEnabled(boolean)void setZoomEnabled(boolean isZoomEnabled)
boolean isScrollEnabled()
setScrollEnabled(boolean)void setScrollEnabled(boolean isScrollEnabled)
void moveTo(float x,
float y)
void moveToWithAnimation(float x,
float y)
;ZoomType getZoomType()
setZoomType(ZoomType)void setZoomType(ZoomType zoomType)
float getMaxZoom()
void setMaxZoom(float maxZoom)
float getZoomLevel()
void setZoomLevel(float x,
float y,
float zoomLevel)
x - x within chart maximum viewporty - y within chart maximum viewportzoomLevel - value from 1 to maxZoom(default 20). 1 means chart has no zoom.void setZoomLevelWithAnimation(float x,
float y,
float zoomLevel)
x - x within chart maximum viewporty - y within chart maximum viewportzoomLevel - value from 1 to maxZoom(default 20). 1 means chart has no zoom.boolean isValueTouchEnabled()
setValueTouchEnabled(boolean)void setValueTouchEnabled(boolean isValueTouchEnabled)
Viewport getMaximumViewport()
setMaximumViewport(Viewport)
instead.setMaximumViewport(Viewport)void setMaximumViewport(Viewport maxViewport)
Viewport getCurrentViewport()
setCurrentViewport(Viewport) instead.setCurrentViewport(Viewport)void setCurrentViewport(Viewport targetViewport)
void setCurrentViewportWithAnimation(Viewport targetViewport)
void setCurrentViewportWithAnimation(Viewport targetViewport, long duration)
void resetViewports()
boolean isValueSelectionEnabled()
setValueSelectionEnabled(boolean)void setValueSelectionEnabled(boolean isValueSelectionEnabled)
void selectValue(SelectedValue selectedValue)
SelectedValue getSelectedValue()
boolean isContainerScrollEnabled()
void setContainerScrollEnabled(boolean isContainerScrollEnabled,
ContainerScrollType containerScrollType)