jiahuang / d3-timeline

Simple JS timeline plugin for d3
1.03k stars 282 forks source link

Prevent label overlap #34

Open kewpe20 opened 9 years ago

kewpe20 commented 9 years ago

When horizontal scrolling is enabled, how do I prevent the label from being overlapped by the data?

jiahuang commented 9 years ago

I can't think of a good way to do this right now... currently the way scrolling is done is that the entire timeline is rendered and then translated on a scroll event. It relies on the width of the svg element being smaller than the current displayed window to cut off the elements to the right.

A dumb hacky solution might be to add a class on the text labels to set the background color...