object responsible for animations
variable for the text that is drawn in the center of the pie-chart
the rectangular radius of the bounding box for the center text, as a percentage of the pie hole default 1.f (100%)
Readonly
circlerect object that represents the bounds of the piechart, needed for drawing the circle
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 enabled, centertext is drawn
flag indicating if entry labels should be drawn or not
if true, the white hole inside the chart will be drawn
if set to true, the marker view is drawn when a value is clicked
if true, the slices of the piechart are rounded
if true, the hole will see-through to the inner tips of the slices
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
Gesture 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.
Protected
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 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 0
Protected
mthe legend object containing all data associated with the legend
Protected
mProtected
mflag that indicates if rotation is enabled or not
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
object responsible for rendering the data
the radius of the transparent circle that is drawn next to the hole in the piechart in percent of the maximum radius (max = the radius of the whole chart), default 55% -> means 5% larger than the center-hole by
if true, the values inside the piechart are drawn as percent values
object that manages the bounds and drawing constraints of the chart
the object representing the labels on the x-axis
returns the absolute angles of the different chart slices (where the slices end)
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.
Sets the color of the center text of the PieChart.
Returns the offset on the x- and y-axis the center text has in dp.
Sets the offset the center text should have from it's original position in dp. Default x = 0, y = 0
Sets the size of the center text of the PieChart in dp.
Sets the typeface for the center-text paint
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 the diameter of the pie- or radar-chart
returns an integer array of all the different angles the chart slices have the angles in the returned array determine how much space (of 360°) each slice takes
Sets the color the entry labels are drawn with.
Sets the size of the entry labels in dp. Default: 13dp
Sets a custom font for the drawing of the entry labels.
Sets extra offsets (around the chart view) to be appended to the auto-calculated offsets.
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.
Sets the color for the hole that is drawn in the center of the PieChart (if enabled).
Returns the size of the hole radius in percent of the total radius.
sets the radius of the hole in the center of the piechart in percent of the maximum radius (max = the radius of the whole chart), default 50%
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).
Sets the max angle that is used for calculating the pie-circle. 360 means it's a full PieChart, 180 results in a half-pie-chart. Default: 360
min 90, max 360
The minimum angle slices on the chart are rendered with, default is 0.
minimum angle for slices
Set the angle to set minimum size for slices, you must call #notifyDataSetChanged() and #invalidate() when changing this, only works if there is enough room for all slices to have the minimum angle.
minimum 0, maximum is half of #setMaxAngle
Sets the color of the no data text.
Sets the typeface to be used for the no data text.
Returns the radius of the chart in pixels.
gets the raw version of the current rotation angle of the pie chart the returned value could be any value, negative or positive, outside of the 360 degrees. this is used when working with rotation direction, mainly by gestures and animations.
Protected
requiredReturns the base offset needed for the chart without calculating the legend size.
Protected
requiredReturns the required offset for the chart legend.
gets a normalized version of the current rotation angle of the pie chart, which will always be between 0.0 < 360.0
Set an offset for the rotation of the RadarChart in degrees. Default 270 --> top (NORTH)
Returns true if rotation of the chart by touch is enabled, false if not.
Set this to true to enable the rotation / spinning of the chart by touch. Set it to false to disable it. Default: true
Sets the amount of transparency the transparent circle should have 0 = fully transparent, 255 = fully opaque. Default value is 100.
0-255
Sets the color the transparent-circle should have.
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
calcProtected
drawProtected
drawProtected
getHighlights 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
initCalled 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
setup
View that represents a pie chart. Draws cake like slices.