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

Bubble chart not clipping bubbles to within plot area #6296

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

Bubble chart not clipping bubbles to within plot area #6296

DCIP opened this issue Jan 25, 2017 · 6 comments

Comments

@DCIP
Copy link

@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
Copy link
Contributor

@pawelfus pawelfus commented Jan 25, 2017

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

@hon2a
Copy link

@hon2a hon2a commented Feb 3, 2017

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

@pawelfus
Copy link
Contributor

@pawelfus 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
Copy link

@hon2a hon2a commented Mar 17, 2017

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

@hon2a
Copy link

@hon2a hon2a commented Mar 24, 2017

Works like a charm :)

@mobilutz
Copy link

@mobilutz 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants