Highcharts: Cross hair labels is not displayed on y logarithmic axis

Created on 28 Jun 2018  路  3Comments  路  Source: highcharts/highcharts

Expected behaviour

If in highstock and highchart if y axis is logarithmic then crosshair label should be displayed (Of course crosshair labels are enabled )

Actual behaviour

If in highstock and highchart if y axis is logarithmic then crosshair label is not displayed (Of course crosshair labels are enabled )

Live demo with steps to reproduce

You make take any chart with y axis on logarithmic scale.

Product version


6.1.1

Affected browser(s)

Highcharts Stock Bug Regression

Most helpful comment

I think issue may be in addEvent(Axis, 'afterDrawCrosshair', function (event) {
......

crossLabel.attr({
text: formatOption ?
format(formatOption, { value: value }, chart.time) :
options.formatter.call(this, value),
x: posx,
y: posy,
// Crosshair should be rendered within Axis range (#7219)
visibility: value < this.min || value > this.max ? 'hidden' : 'visible'
});
'''''
}

here this.min & this.max are not real coordinates and that's why crosshair labels is always hidden

All 3 comments

Thanks for reporting!

Live demo: https://jsfiddle.net/BlackLabel/voa15ktw/4/

Internal note:
It works for values 1-2, but not for the others.

_Internal note_
Its a regression since 6.0.5.
6.0.4 works properly.

I think issue may be in addEvent(Axis, 'afterDrawCrosshair', function (event) {
......

crossLabel.attr({
text: formatOption ?
format(formatOption, { value: value }, chart.time) :
options.formatter.call(this, value),
x: posx,
y: posy,
// Crosshair should be rendered within Axis range (#7219)
visibility: value < this.min || value > this.max ? 'hidden' : 'visible'
});
'''''
}

here this.min & this.max are not real coordinates and that's why crosshair labels is always hidden

Was this page helpful?
0 / 5 - 0 ratings