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

Hide pie slice from legend animation #4170

Closed
oysteinmoseng opened this issue May 7, 2015 · 1 comment
Closed

Hide pie slice from legend animation #4170

oysteinmoseng opened this issue May 7, 2015 · 1 comment

Comments

@oysteinmoseng
Copy link
Member

When hiding a pie slice by clicking on it in the legend, the selection halo is not animated and stays behind.

Can be observed in the pie legend demo.

@pawelfus
Copy link
Contributor

Simple workaround: http://jsfiddle.net/4r2mr8qr/ (set proper state for the slice after changing visibility).

(function (H) {
    H.wrap(H.seriesTypes.pie.prototype.pointClass.prototype, 'setVisible', function (p, v, r) {
        p.call(this, v, r);
        if (!this.visible) {
            this.setState("");
        } else {
            this.setState("hover");
        }
    });
})(Highcharts)

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

No branches or pull requests

2 participants