aysark / dashing-timeline

Stylish timeline widget for Dashing.io
MIT License
28 stars 7 forks source link

Full-width timeline graph -> horizontal text alignment #12

Open derro opened 6 years ago

derro commented 6 years ago

Hi,

thanks for the awesome widget!

I've tried to make a full-width timeline graph where more information can be displayed per event. The container (svg) has already the fulll size (4 segments - 1500px x 900px) but the text is still placed the same as it would only be the with of one segment instead of 4 (centered in the middle).

Is there an easy way to define that the text will be aligned according to the width of the svg-container?

Thanks for the help!

cryptokovski commented 6 years ago

The same issue here. Have you able to solve ? @aysark Could you please help ?

aysark commented 5 years ago

Sorry for delayed response guys, haven't worked on this in a while.

Code currently does not support full-width and text is somewhat hardcoded to use a constant margin parameter. Although it shouldn't be hard to replace that to accomodate width, this is the line that sets the text x position which is where you should start: https://github.com/aysark/dashing-timeline/blob/master/assets/javascripts/timeknots.js#L191