-
Notifications
You must be signed in to change notification settings - Fork 0
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
Highcharts/8 packed bubble algorithm #9
base: main
Are you sure you want to change the base?
Conversation
i have 3 scripts in the html for each part of the exercise part 2 and 3 are outcommented but are hooked up to the same container 'container' in the html-file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
To be add part of 8.1 task, throwing points between series.
Thank you for your comments, man! I will implement your suggested changes when I have time and ping you on slack after I have done so! :) |
A bubble now moves between series at initial load-event! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exactly!
|
||
const radiiDistance = (c1, c2) => Math.sqrt(squared(c1.x - c2.x) + squared(c1.y - c2.y)); | ||
|
||
const collides = (c1, c2) => (radiiDistance(c1, c2) <= c1.r + c2.r); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bravo, this way of looking for collisions is interesting, close to a solution!
I have other propose that can be used to find collisions, witch refers to the layoutAlgorithm.repulsiveForce and value of d
, current distance between two nodes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool way to solve it, I haven't realized you can use stuff from other series-types that way, thanks for shoving! I will implement it today or tomorrow!
* i am also not able to drag bubbles in this chart which specifically states that this is possible: | ||
https://jsfiddle.net/gh/get/library/pure/highcharts/highcharts/tree/master/samples/highcharts/series-packedbubble/packed-dashboard/ | ||
|
||
* i think it could be the old laptop i am currently working on which is the issue, it is very old and kindof buggy x) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like it's not a problem with old computer ;)
Drag and drop stoped work and It's related to this bug, regression HC version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, i see! x) Thank you for the info!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exercise complete 👌, impressed that you created a mechanism to find bubbles collision, well done 🙂
Oh, thank you! I didn't realize my commit updated this PR lol! x) My plan was to use repulsiveForce like you showed, I was just cleaning my code a bit before implementing it xD |
not perfect, but somewhat working, and ready for pros to look at and help 8)
main_part3.js
contains text regarding the exercise