default constructor for initialization in code
object responsible for animations
flag that indicates if auto scaling on the y axis is enabled
wheter to highlight drawing will be clipped to contentRect, otherwise they can bleed outside the content rect.
the default IValueFormatter that has been determined by the chart considering the provided minimum and maximum values, number of digits depends on provided chart-data
palet object used for drawing the description text in the bottom right corner of the chart
Wether to disable scroll while touching the chart. Default to true
If set to true, chart continues to scroll after touch up
Deceleration friction coefficient in [0 ; 1] interval, higher values indicate that speed will decrease slowly, for example if it set to 0, it will stop immediately. value must be < 1.0
if true, dragging is enabled for the chart
flag indicating if the grid background should be drawn or not
if set to true, the marker view is drawn when a value is clicked
Extra offsets to be appended to the viewport
Wether to filter highlights by axis. Default is true
array of Highlight objects that reference the highlighted slices in the chart
Protected
jobstasks to be done after the view is setup
flag indicating if the chart should stay at the same position after a rotation. Default is false.
axis renderer for the left axis.
Protected
leftGesture listener for custom callbacks when making gestures on the chart.
the view that represents the marker
The maximum distance in dp away from an entry causing it to highlight.
the object representing the labels on the left y-axis
the object representing the labels on the right y-axis
the maximum number of entries to which values will be drawn (entry numbers greater than this value will cause value-labels to disappear)
Protected
mProtected
mobject that holds all data that was originally set for the chart, before it was modified or any filtering algorithms had been applied
the object responsible for representing the description text
Protected
mflag that indicates if double tap zoom is enabled or not
Protected
mProtected
mpalet object for the (by default) lightgrey background of the grid
Protected
mflag that indicates if highlighting per dragging over a fully zoomed out chart is enabled
Protected
mFlag that indicates if highlighting per tap (touch) is enabled
palet object for drawing the information text when there are no values in the chart
Sets the minimum offset (padding) around the chart, defaults to 15
Protected
mthe legend object containing all data associated with the legend
Protected
mProtected
mCODE BELOW THIS RELATED TO SCALING AND GESTURES AND MODIFICATION OF THE VIEWPORT
let the chart know it does not need to compute autoScale (it can used the cached ones)
let the chart know it does not need to compute axis and legends (it can used the cached ones)
text that is displayed when the chart is empty
Protected
offsetsflag that indicates if offsets calculation has already been done or not
flag that indicates if pinch-zoom is enabled. if true, both x and y axis can be scaled with 2 fingers, if false, x and y axis can be scaled separately
Protected
posbuffer for storing highest visible x point
Protected
posbuffer for storing lowest visible x point
object responsible for rendering the data
axis renderer for the right axis.
Protected
rightobject that manages the bounds and drawing constraints of the chart
the object representing the labels on the x-axis
axis renderer for the x axis.
flag that indicates zoomed pan gesture should only work with 2 pointers
Returns true if either the left or the right or both axes are inverted.
Returns a recyclable MPPointF instance. Returns the center polet of the chart (the whole View) in pixels.
Returns a recyclable MPPointF instance. Returns the center of the chart taking offsets under consideration. (returns the center of the content rectangle)
Returns a recyclable MPPointF instance.
Returns the bitmap that represents the chart.
Returns the rectangle that defines the borders of the chart-value surface (into which the actual values are drawn).
Returns the animator responsible for animating chart values.
Returns true if zooming via double-tap is enabled false if not.
Set this to true to enable zooming in by double-tap on the chart. Default: enabled
Returns true if dragging is enabled for the chart, false if not.
Set this to true to enable dragging (moving the chart with the finger) for the chart (this does not effect scaling).
Sets extra offsets (around the chart view) to be appended to the auto-calculated offsets.
Sets the color for the background of the chart-drawing area (everything behind the grid lines).
Returns true if there are values to highlight, false if there are no values to highlight. Checks if the highlight array is null, has a length of zero or if the first object is null.
Returns the highest x-index (value on the x-axis) that is still visible on the chart.
Set this to true to allow highlighting per dragging over the chart surface when it is fully zoomed out. Default: true
Protected
lastSets the last highlighted value for the touchlistener.
Returns true if the chart is empty (meaning it's data object is either null or contains no entries).
Returns the lowest x-index (value on the x-axis) that is still visible on the chart.
Sets the color of the no data text.
Sets the typeface to be used for the no data text.
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.
Sets the size of the area (range on the x-axis) that should be maximum visible at once (no further zooming out allowed). If this is e.g. set to 10, no more than a range of 10 on the x-axis can be viewed at once without scrolling.
The maximum visible range of x-values.
Sets the size of the area (range on the x-axis) that should be minimum visible at once (no further zooming in allowed). If this is e.g. set to 10, no less than a range of 10 on the x-axis can be viewed at once without scrolling.
The minimum visible range of x-values.
Returns the maximum x value of the chart, regardless of zoom or translation.
Returns the minimum x value of the chart, regardless of zoom or translation.
Returns the maximum y value of the chart, regardless of zoom or translation.
Returns the minimum y value of the chart, regardless of zoom or translation.
returns the current y-max value across all DataSets
returns the current y-min value across all DataSets
Either posts a job immediately if the chart has already setup it's dimensions or adds the job to the execution queue.
Animates the rendering of the chart on the x-axis with the specified animation time. If animate(...) is called, no further calling of invalidate() is necessary to refresh the chart. ANIMATIONS ONLY WORK FOR API LEVEL 11 (Android 3.0.x) AND HIGHER.
Optional
easing: EasingFunctiona custom easing function to be used on the animation phase
Animates the drawing / rendering of the chart on both x- and y-axis with the specified animation time. If animate(...) is called, no further calling of invalidate() is necessary to refresh the chart. ANIMATIONS ONLY WORK FOR API LEVEL 11 (Android 3.0.x) AND HIGHER.
Optional
easingX: EasingFunctiona custom easing function to be used on the animation phase
Optional
easingY: EasingFunctiona custom easing function to be used on the animation phase
Animates the rendering of the chart on the y-axis with the specified animation time. If animate(...) is called, no further calling of invalidate() is necessary to refresh the chart. ANIMATIONS ONLY WORK FOR API LEVEL 11 (Android 3.0.x) AND HIGHER.
Optional
easing: EasingFunctiona custom easing function to be used on the animation phase
Protected
autoProtected
calcProtected
calculateThis will move the center of the current viewport to the specified x and y value. This also refreshes the chart by calling invalidate().
which axis should be used as a reference for the y axis
Protected
drawProtected
drawProtected
drawProtected
getreturns the DataSet object displayed at the touched position of the chart
Protected
getReturns a recyclable MPPointF instance. Returns the position (in pixels) the provided Entry has inside the chart view or null, if the provided Entry is null.
Returns the Transformer class that contains all matrices and is responsible for transforming values into pixels on the screen and backwards.
Optional
which: AxisDependencyReturns a recyclable MPPointD instance Returns the x and y values in the chart at the given touch point (encapsulated in a MPPointD). This method transforms pixel coordinates to coordinates / values in the chart. This is the opposite method to getPixelForValues(...).
Highlights any y-value at the given x-value in the given DataSet. Provide -1 as the dataSetIndex to undo all highlighting.
The x-value to highlight
The y-value to highlight. Supply NaN
for "any"
The dataset index to search in
Optional
callListener: booleanShould the listener be called for this change
Protected
initThis 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. This also refreshes the chart by calling invalidate().
which axis should be used as a reference for the y-axis
This will move the left side of the current viewport to the specified x-value and center the viewport to the y value animated. This also refreshes the chart by calling invalidate().
the duration of the animation in milliseconds
Called from layout when this view should assign a size and position to each of its children. Derived classes with children should override this method and call layout on each of their children.
Left position, relative to parent
Top position, relative to parent
Right position, relative to parent
Bottom position, relative to parent
Protected
prepareProtected
prepareProtected
setupSets custom offsets for the current ViewPort (the offsets on the sides of the actual chart window). Setting this will prevent the chart from automatically calculating it's offsets. Use resetViewPortOffsets() to undo this. ONLY USE THIS WHEN YOU KNOW WHAT YOU ARE DOING, else use setExtraOffsets(...).
Limits the maximum and minimum x range that can be visible by pinching and zooming. e.g. minRange=10, maxRange=100 the smallest range to be displayed at once is 10, and no more than a range of 100 values can be viewed at once without scrolling
Zooms in or out by the given scale factor. x and y are the values (NOT PIXELS) of the zoom center..
the axis relative to which the zoom should take place
The BubbleChart. Draws bubbles. Bubble chart implementation: Copyright 2015 Pierre-Marc Airoldi Licensed under Apache License 2.0. In the BubbleChart, it is the area of the bubble, not the radius or diameter of the bubble that conveys the data.