|
@@ -405,17 +405,19 @@ export default class AxisChart extends BaseChart { |
|
|
if(!s.yExtremes) return; |
|
|
if(!s.yExtremes) return; |
|
|
|
|
|
|
|
|
let index = getClosestInArray(relX, s.xAxis.positions, true); |
|
|
let index = getClosestInArray(relX, s.xAxis.positions, true); |
|
|
let dbi = this.dataByIndex[index]; |
|
|
|
|
|
|
|
|
|
|
|
this.tip.setValues( |
|
|
|
|
|
dbi.xPos + this.tip.offset.x, |
|
|
|
|
|
dbi.yExtreme + this.tip.offset.y, |
|
|
|
|
|
{name: dbi.formattedLabel, value: ''}, |
|
|
|
|
|
dbi.values, |
|
|
|
|
|
index |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
this.tip.showTip(); |
|
|
|
|
|
|
|
|
if (index >= 0) { |
|
|
|
|
|
let dbi = this.dataByIndex[index]; |
|
|
|
|
|
|
|
|
|
|
|
this.tip.setValues( |
|
|
|
|
|
dbi.xPos + this.tip.offset.x, |
|
|
|
|
|
dbi.yExtreme + this.tip.offset.y, |
|
|
|
|
|
{name: dbi.formattedLabel, value: ''}, |
|
|
|
|
|
dbi.values, |
|
|
|
|
|
index |
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
this.tip.showTip(); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
renderLegend() { |
|
|
renderLegend() { |
|
|