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

Bubble chart not clipping bubbles to within plot area #6296

Closed
DCIP opened this Issue Jan 25, 2017 · 6 comments

Comments

Projects
None yet
4 participants
@DCIP

DCIP commented Jan 25, 2017

Expected behaviour

Bubbles that extend outside of the plot area should be clipped.

Actual behaviour

When axis range is forced and bubbles are on the edge of the plot area, they overflow the plot area rather than being clipped. This is scatterplot behaviour rather than bubble chart behaviour.

Live demo with steps to reproduce

http://jsfiddle.net/4s6fyzn1/

Affected browser(s)

Tested in Chrome

@pawelfus pawelfus added the Regression label Jan 25, 2017

@pawelfus

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus Jan 25, 2017

Contributor

Thank you for reporting! It's a regression from: f5c95d2

Contributor

pawelfus commented Jan 25, 2017

Thank you for reporting! It's a regression from: f5c95d2

@hon2a

This comment has been minimized.

Show comment
Hide comment
@hon2a

hon2a commented Feb 3, 2017

Demo of the expected result (working on v4.2.7).

@pawelfus

This comment has been minimized.

Show comment
Hide comment
@pawelfus

pawelfus Mar 16, 2017

Contributor

Workaround:

Demo: http://jsfiddle.net/3feyufp9/

Plugin code:

  (function(H) {
    H.wrap(H.seriesTypes.bubble.prototype, 'render', function(proceed) {
      proceed.apply(this, Array.prototype.slice.call(arguments, 1));
      this.markerGroup.clip(this.chart.clipRect);
    });
    H.wrap(H.seriesTypes.bubble.prototype, 'setClip', function(proceed) {
      proceed.apply(this, Array.prototype.slice.call(arguments, 1));
      this.markerGroup.clip(this.chart.clipRect);
    });
  })(Highcharts);
Contributor

pawelfus commented Mar 16, 2017

Workaround:

Demo: http://jsfiddle.net/3feyufp9/

Plugin code:

  (function(H) {
    H.wrap(H.seriesTypes.bubble.prototype, 'render', function(proceed) {
      proceed.apply(this, Array.prototype.slice.call(arguments, 1));
      this.markerGroup.clip(this.chart.clipRect);
    });
    H.wrap(H.seriesTypes.bubble.prototype, 'setClip', function(proceed) {
      proceed.apply(this, Array.prototype.slice.call(arguments, 1));
      this.markerGroup.clip(this.chart.clipRect);
    });
  })(Highcharts);

@pawelfus pawelfus self-assigned this Mar 16, 2017

@hon2a

This comment has been minimized.

Show comment
Hide comment
@hon2a

hon2a Mar 17, 2017

@pawelfus Thanks for the work-around, I'll give it a try.

hon2a commented Mar 17, 2017

@pawelfus Thanks for the work-around, I'll give it a try.

@hon2a

This comment has been minimized.

Show comment
Hide comment
@hon2a

hon2a Mar 24, 2017

Works like a charm :)

hon2a commented Mar 24, 2017

Works like a charm :)

@mobilutz

This comment has been minimized.

Show comment
Hide comment
@mobilutz

mobilutz Apr 10, 2017

@pawelfus Would love to see the real fix in one of the next releases.

mobilutz commented Apr 10, 2017

@pawelfus Would love to see the real fix in one of the next releases.

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