Skip to content
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

Marker not at the center of the point #7273

Closed
artem78 opened this issue Oct 13, 2017 · 2 comments
Closed

Marker not at the center of the point #7273

artem78 opened this issue Oct 13, 2017 · 2 comments
Assignees

Comments

@artem78
Copy link

artem78 commented Oct 13, 2017

I`m using markers with custom images. The bug is that they placed with offset of the point. I noticed that this is happening when I use marker enabled parameter:

    plotOptions: {
        series: {
            marker: {
                enabled: false
            }
        }
    },

h_1507893506_8577037_a76f242a80

Without this param all looks fine:
h_1507893444_7440525_0451dc9184

Demo: http://jsfiddle.net/crazzzy/7mug981a/
I see this issue in both my browsers Firefox and Chrome.

@pawelfus
Copy link
Contributor

Hi @artem78

Thanks!

Workaround:
Set marker.radius = -2, demo: http://jsfiddle.net/7mug981a/1/

Internal note:
It's caused by default value for radius (4) which is cleaned up here:

highcharts/js/parts/Series.js

Lines 3676 to 3678 in b399225

if (point.hasImage) {
radius = 0; // and subsequently width and height is not set
}

But only for series with enabled markers:

if (hasMarkers) {
markerAttribs = series.markerAttribs(point, state);
}

@pawelfus pawelfus self-assigned this Dec 29, 2017
pawelfus added a commit that referenced this issue Dec 29, 2017
pawelfus added a commit that referenced this issue Dec 29, 2017
@TorsteinHonsi
Copy link
Collaborator

@pawelfus The test for https://utils.highcharts.local/samples/#test/unit-tests/series/marker doesn't pass in Firefox. Will you have a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants