labella.js icon indicating copy to clipboard operation
labella.js copied to clipboard

Idea: Position labels above&below resp left&right the timeline

Open eikaramba opened this issue 10 years ago • 4 comments

You see this type of timeline quite often i would say, where you have a "centered" timeline and the labels are positioned left and right of it. Now with many lables one could utilize the same algorithms currently available just for both sides*, so that even then could have more labels than fit on both sides rendered.

*= I guess the naive solution would be to just calculate the algorithms independly for both sides, but maybe later it might be good to have an algorithm that tries to optimize the space globally.

eikaramba avatar Dec 03 '15 11:12 eikaramba

I think this is also applicable, for left/right positioning shouldn't the labels be horizontal not vertical as per this example:

Basic Left example

stevencheng avatar Dec 03 '15 12:12 stevencheng

Thanks for the feedback @eikaramba . You are right. For now, a naive solution is to manually split and calculate the algorithm independently for both sides.

Optimizing this for both side is actually NPC, but perhaps I can adapt the heuristics for distributing labels into multiple rows for splitting labels onto two sides. Not guarantee to be optimal, but better than hash. Will consider this idea when I work on the next version. Thanks again.

kristw avatar Dec 03 '15 17:12 kristw

Any update on above&below labels positioning? Thanks

iamroi avatar Sep 09 '18 05:09 iamroi

What is the status on this issue?

Aditya-Naresh avatar Apr 11 '23 15:04 Aditya-Naresh