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

Exception in runPointActions method after Series.update() #7127

Closed
AlexanderSokolov1 opened this Issue Sep 5, 2017 · 2 comments

Comments

Projects
None yet
2 participants
@AlexanderSokolov1

AlexanderSokolov1 commented Sep 5, 2017

Expected behaviour

The "update" method finished successful and no errors occurred.

Actual behaviour

Exception: Uncaught TypeError: hoverPoint.firePointEvent is not a function
occurred after calling the "update" method in series event handler.

Affected chart types

Heatmap

Live demo with steps to reproduce

Live demo
I am trying to show data labels on heatmap chart when the user hovers mouse on the chart series. It works fine, but exception occurred after calling the "update" method (only at the "mouseOver" event).

series: [{
    name: '...',
    data: ...,
    events: {
        mouseOver: function() {
            this.update({ dataLabels: { enabled: true }});
        },
        mouseOut: function() {
            this.update({ dataLabels: { enabled: false }});
       }
    }
}]

The exception occurred when the runPointActions method tried to call firePointEvent method of the hoverPoint object:
hoverPoint.firePointEvent('mouseOver');
But all fields and methods of the hoverPoint object are null because the update method destroys all series point objects.

Affected browser(s)

All

@TorsteinHonsi

This comment has been minimized.

Show comment
Hide comment
@TorsteinHonsi

TorsteinHonsi Sep 6, 2017

Collaborator

Thanks for reporting!

Workaround

For your specific use case, I think calling Series.update on mouse over and mouse out is overkill that will affect performance on larger data sets. Instead, I would go for a pure CSS solution of hiding and showing the data labels: http://jsfiddle.net/highcharts/z4pyzcdh/1/

Collaborator

TorsteinHonsi commented Sep 6, 2017

Thanks for reporting!

Workaround

For your specific use case, I think calling Series.update on mouse over and mouse out is overkill that will affect performance on larger data sets. Instead, I would go for a pure CSS solution of hiding and showing the data labels: http://jsfiddle.net/highcharts/z4pyzcdh/1/

@AlexanderSokolov1

This comment has been minimized.

Show comment
Hide comment
@AlexanderSokolov1

AlexanderSokolov1 Sep 6, 2017

Thank you for reply. It is helpful.

AlexanderSokolov1 commented Sep 6, 2017

Thank you for reply. It is helpful.

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