public class PieMapper extends Object
Constructor and Description |
---|
PieMapper() |
Modifier and Type | Method and Description |
---|---|
void |
addPieSegment(int dataIndex,
float value,
float startAngle,
float angle)
Add configuration for a PieChart Segment
|
boolean |
areAllSegmentPresent(int datasetSize)
If we have all PieChart Config then there is no point in reloading it
|
void |
clearPieSegments()
Clears the pie segments list.
|
double |
getAngle(Point screenPoint)
Fetches angle relative to pie chart center point where 3 O'Clock is 0 and
12 O'Clock is 270degrees
|
Shape |
getSegmentShape(int dataIndex) |
SeriesSelection |
getSeriesAndPointForScreenCoordinate(Point screenPoint)
Fetches the SeriesSelection for the PieSegment selected.
|
boolean |
isOnPieChart(Point screenPoint)
Checks if Point falls within PieChart
|
void |
setDimensions(int pieRadius,
int centerX,
int centerY)
Set PieChart location on screen.
|
public void setDimensions(int pieRadius, int centerX, int centerY)
pieRadius
- centerX
- centerY
- public boolean areAllSegmentPresent(int datasetSize)
datasetSize
- public void addPieSegment(int dataIndex, float value, float startAngle, float angle)
dataIndex
- value
- startAngle
- angle
- public void clearPieSegments()
public double getAngle(Point screenPoint)
screenPoint
- public boolean isOnPieChart(Point screenPoint)
screenPoint
- public SeriesSelection getSeriesAndPointForScreenCoordinate(Point screenPoint)
screenPoint
- - the user tap locationpublic Shape getSegmentShape(int dataIndex)