public class BarHighlighter extends ChartHighlighter<BarDataProvider>
mChart, mHighlightBuffer| Constructor and Description |
|---|
BarHighlighter(BarDataProvider chart) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
protected BarLineScatterCandleBubbleData |
getData() |
protected float |
getDistance(float x1,
float y1,
float x2,
float y2)
Calculates the distance between the two given points.
|
Highlight |
getHighlight(float x,
float y)
Returns a Highlight object corresponding to the given x- and y- touch positions in pixels.
|
Highlight |
getStackedHighlight(Highlight high,
IBarDataSet set,
float xVal,
float yVal)
This method creates the Highlight object that also indicates which value of a stacked BarEntry has been
selected.
|
buildHighlights, getClosestHighlightByPixel, getHighlightForX, getHighlightPos, getHighlightsAtXValue, getMinimumDistance, getValsForTouchpublic BarHighlighter(BarDataProvider chart)
public Highlight getHighlight(float x, float y)
IHighlightergetHighlight in interface IHighlightergetHighlight in class ChartHighlighter<BarDataProvider>public Highlight getStackedHighlight(Highlight high, IBarDataSet set, float xVal, float yVal)
high - the Highlight to work with looking for stacked valuesset - xVal - yVal - protected int getClosestStackIndex(Range[] ranges, float value)
ranges - value - protected float getDistance(float x1,
float y1,
float x2,
float y2)
ChartHighlightergetDistance in class ChartHighlighter<BarDataProvider>protected BarLineScatterCandleBubbleData getData()
getData in class ChartHighlighter<BarDataProvider>