daattali / timevis

📅 Create interactive timeline visualizations in R
http://daattali.com/shiny/timevis-demo/
Other
655 stars 157 forks source link

Label text: does not bleed over #27

Closed briglass closed 7 years ago

briglass commented 7 years ago

timevis_bleed

When run using RStudio, the label text does not bleed over the labels

That is, if the width of the text is longer than the width of the label box, then the text is cut off. In the examples online, the text extends beyond label box

daattali commented 7 years ago

I don't think it "bleeds over" when you're in a browser as well? Whether it does or not is because of CSS - if you want it one way or the other, you need to use a bit of custom CSS (probably something with an "overflow" property). Moreover, if it works in a browser but not in RStudio, then that would be because the rstudio viewer is its own very minimal web browser that has doesn't support many things that real browsers do. If you do find some CSS to make it bleed over like you like, you could post it here for future reference!

briglass commented 7 years ago

Thanks for the quick response. I've included a screenshot from the web demo, you can see that the text extends beyond the label box -- I'd like to replicate this behavior in the R output, as I have long labels timevis_bleed2

daattali commented 7 years ago

Have you tried replicating my code? It's all available on github: https://github.com/daattali/timevis/tree/master/inst/example

If you try running the same code without any custom CSS, you'll see that indeed labels do not bleed over by default. Looks like I used a custom line of CSS to do that. https://github.com/daattali/timevis/blob/master/inst/example/www/style.css#L71

briglass commented 7 years ago

Adding that line worked like a charm, thanks!