Minor changes to highlighting
This commit is contained in:
parent
ded930a2fa
commit
f83a7e3b26
2 changed files with 8 additions and 3 deletions
|
@ -632,7 +632,7 @@ public abstract class Chart<T extends ChartData<? extends IDataSet<? extends Ent
|
|||
} else {
|
||||
if (this instanceof BarLineChartBase
|
||||
&& ((BarLineChartBase) this).isHighlightFullBarEnabled())
|
||||
high = new Highlight(high.getX(), Float.NaN, Float.NaN, Float.NaN, -1, YAxis.AxisDependency.LEFT);
|
||||
high = new Highlight(high.getX(), -1);
|
||||
|
||||
// set the indices to highlight
|
||||
mIndicesToHighlight = new Highlight[]{
|
||||
|
|
|
@ -70,6 +70,11 @@ public class Highlight {
|
|||
this.mDataSetIndex = dataSetIndex;
|
||||
}
|
||||
|
||||
public Highlight(float x, int dataSetIndex, int stackIndex) {
|
||||
this(x, dataSetIndex);
|
||||
this.mStackIndex = stackIndex;
|
||||
}
|
||||
|
||||
/**
|
||||
* constructor
|
||||
*
|
||||
|
@ -77,7 +82,7 @@ public class Highlight {
|
|||
* @param y the y-value of the highlighted value
|
||||
* @param dataSetIndex the index of the DataSet the highlighted value belongs to
|
||||
*/
|
||||
public Highlight(float x, float y, float xPx, float yPx, int dataSetIndex, YAxis.AxisDependency axis) {
|
||||
protected Highlight(float x, float y, float xPx, float yPx, int dataSetIndex, YAxis.AxisDependency axis) {
|
||||
this.mX = x;
|
||||
this.mY = y;
|
||||
this.mXPx = xPx;
|
||||
|
@ -96,7 +101,7 @@ public class Highlight {
|
|||
* selected
|
||||
* @param range the range the selected stack-value is in
|
||||
*/
|
||||
public Highlight(float x, float y, float xPx, float yPx, int dataSetIndex, int stackIndex, Range range,
|
||||
protected Highlight(float x, float y, float xPx, float yPx, int dataSetIndex, int stackIndex, Range range,
|
||||
YAxis.AxisDependency axis) {
|
||||
this(x, y, xPx, yPx, dataSetIndex, axis);
|
||||
this.mStackIndex = stackIndex;
|
||||
|
|
Loading…
Add table
Reference in a new issue