public class BarHighlighter extends ChartHighlighter<BarDataProvider>
mChart| Constructor and Description |
|---|
BarHighlighter(BarDataProvider chart) |
| Modifier and Type | Method and Description |
|---|---|
protected float |
getBase(float x)
Returns the base x-value to the corresponding x-touch value in pixels.
|
protected int |
getClosestStackIndex(Range[] ranges,
float value)
Returns the index of the closest value inside the values array / ranges (stacked barchart) to the value given as
a parameter.
|
Highlight |
getHighlight(float x,
float y)
Returns a Highlight object corresponding to the given x- and y- touch positions in pixels.
|
protected Range[] |
getRanges(BarEntry entry)
Splits up the stack-values of the given bar-entry into Range objects.
|
protected SelectionDetail |
getSelectionDetail(int xIndex,
float y,
int dataSetIndex)
Returns the corresponding SelectionDetail for a given xIndex and y-touch position in pixels.
|
protected Highlight |
getStackedHighlight(SelectionDetail selectionDetail,
IBarDataSet set,
int xIndex,
double yValue)
This method creates the Highlight object that also indicates which value of a stacked BarEntry has been selected.
|
protected int |
getXIndex(float x)
Returns the corresponding x-index for a given touch-position in pixels.
|
getSelectionDetailsAtIndexpublic BarHighlighter(BarDataProvider chart)
public Highlight getHighlight(float x, float y)
ChartHighlightergetHighlight in class ChartHighlighter<BarDataProvider>protected int getXIndex(float x)
ChartHighlightergetXIndex in class ChartHighlighter<BarDataProvider>protected SelectionDetail getSelectionDetail(int xIndex, float y, int dataSetIndex)
ChartHighlightergetSelectionDetail in class ChartHighlighter<BarDataProvider>protected Highlight getStackedHighlight(SelectionDetail selectionDetail, IBarDataSet set, int xIndex, double yValue)
selectionDetail - the selection detail to work with looking for stacked valuesset - xIndex - yValue - protected int getClosestStackIndex(Range[] ranges, float value)
ranges - value - protected float getBase(float x)
x -