almende / chap-links-library

a web based visualization library for displaying graphs, networks, and timelines
http://almende.github.com/chap-links-library
Apache License 2.0
599 stars 167 forks source link

Timeline - Wrong item top position with empty group #353

Open Jamby93 opened 9 years ago

Jamby93 commented 9 years ago

When you scroll to the point that a group presents no items in the selected timerange, the other items shift up occupying a wrong group label. See at https://almende.github.io/chap-links-library/js/timeline/examples/example13_grouping.html

Correct position: image Zoomed in, wrong position: image

I've corrected it on line 5331 replacing options.groupMinHeight (which is 0 by default) to Math.max(options.groupMinHeight, group.labelHeight), although I don't know if it's the correct way to handle it.

josdejong commented 9 years ago

Thanks for reporting this bug

eye4brain commented 8 years ago

In the case of myself , Math.max (options.groupMinHeight, group.labelHeight) + options.eventMargin and doing, it was just well adjusted . eventMargin the option has been set to 10 .

IhorLaputin commented 8 years ago

This bug can be fixed by set 'groupMinHeight'. Set static value of height like CSS height of the group bars.

Problem in the code related to the optimization: when groups bars hidden from the visibility - legends on Axis bar still visible (groupItems). You count position of the bars that now in the visible but all legends still has visible options