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

add a maximum size, and provide strategies if exceeded #2

Closed
Kcnarf opened this issue Jun 10, 2016 · 1 comment
Closed

add a maximum size, and provide strategies if exceeded #2

Kcnarf opened this issue Jun 10, 2016 · 1 comment

Comments

@Kcnarf
Copy link
Owner

Kcnarf commented Jun 10, 2016

Exceeding strategies could be:

  • omit exceeding data
  • wrap (overlapping at maximum size)
  • place data at modulo(maxSize) (overlapping in the center of the blob)
  • automatic radius reduction
  • automatic stretching with overlapping like d3.layout.force
@Kcnarf
Copy link
Owner Author

Kcnarf commented Jul 7, 2016

This will not be added to this plugin because one of the beeswarm main feature is non-overlapping of data.

If one wants to go beyond this constraint, he/she may consider these alternatives:

  • use this plugin to arrange data with a particular radius, and draw each datum with a larger radius, so that drawn datum will overlap ; with drawn-radius = 1.25*arrangement-radius, each drawn datum will be overlapped at most by ~50% (0,25+0,25), leaving enought space to point/hover each datum independently
  • based on the arrangement provided by the plugin, make your own adequate strategy; considering that the arrangement must not exceed 250px height, and that the arrangement is 400 px height:
    • omit strategy is implemented as .style('display', function(d) { return (bee.y>250)? none : null; }))
    • wrap strategy is implemented as .attr('cy', function(d) { return (bee.y>250)? Math.sign(bee.y)*250 : bee.y; }))
    • modulo strategy is implemented as .attr('cy', function(d) { return bee.y%250; }))
    • linear stretching strategy is implemented as .attr('cy', function(d) { return bee.y*250/400; }))
    • quadratic stretching strategy (no overlapping around the axis, high overlapping at extremes) is implemented as .attr('cy', function(d) { return bee.y - Math.sign(bee.y)*(400-250)*Math.pow((bee.y/400), 2); }));

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

1 participant