-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Strategize Algorithm #1
Comments
Related work by @Fil |
The relevant code for my case was:
|
@Fil Thanks a ton for posting that! I will study it. |
More related work, from New York Times (HT @1wheel) |
I think I've strategized enough. The algorithm is working, and the remaining task is to use Bisection method to get more precision with fewer iterations https://en.wikipedia.org/wiki/Bisection_method |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Related to leebyron/streamgraph#3
The algorithm should find the maximum size possible, and position the label in the center of available space.
Prior art:
Stacked area label placement #2 by Noah Veltman
Streamgraph label positions by Noah Veltman
I'd describe the problem as something like this: Given an aspect ratio for a rectangle, and a polygon bounded on the top and bottom by X-monotone curves, find the rectangle of that aspect ratio of maximum size that fits inside of the polygon.
Ideally the solution would also center the rectangle in the available space, but I'm not quite sure how to phrase that bit, geometrically speaking.
Algorithm sketch:
Note that the algorithm should handle timeseries data where intervals are not consistant, such as the data in Syrian Refugees by Settlement Type.
The text was updated successfully, but these errors were encountered: