New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Synchronized charts with disabled `xAxis.crosshair.snap` #7726

Closed
pawelfus opened this Issue Jan 25, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@pawelfus
Contributor

pawelfus commented Jan 25, 2018

Expected behaviour

With disabled snap, crosshair still should be rendered.

Actual behaviour

Crosshair is missing.

Live demo with steps to reproduce

http://jsfiddle.net/BlackLabel/okdbn4mx/

It's default demo with extra crosshair setting:

                xAxis: {
                    crosshair: {
                      zIndex: 4,
                      snap: false
                    },
                    events: {
                        setExtremes: syncExtremes
                    },
                    labels: {
                        format: '{value} km'
                    }
                },

Solution:

Replace:

if (point) {
    point.highlight(e);
}

With:

if (point) {
    point.highlight(chart.pointer.normalize(e));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment