daattali / timevis

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

Vertical blue line joining box to timeline disappears when data.frame also has type="background" values #8

Closed pssguy closed 7 years ago

pssguy commented 7 years ago
y <- structure(list(start = c("2013-07-01", "2013-05-19"), style = c("background: Ivory;", 
                                                                     "background: #FFFFFF;"), content = c("Reece James<br> Fee(m): 0<br> Starts: 0", 
                                                                                                          "Moyes"), type = c("box", "background"), end = c(NA, "2014-04-22"
                                                                                                          )), .Names = c("start", "style", "content", "type", "end"), row.names = 35:36, class = "data.frame")

timevis(y)

image

daattali commented 7 years ago

Haven't looked into this yet, but if you have 5 minutes, it'd be fruitful to see if this is a problem on my end or by vis.js, by trying to do that in Javascript On Aug 4, 2016 5:42 PM, "Andrew Clark" notifications@github.com wrote:

y <- structure(list(start = c("2013-07-01", "2013-05-19"), style = c("background: Ivory;", "background: #FFFFFF;"), content = c("Reece James
Fee(m): 0
Starts: 0", "Moyes"), type = c("box", "background"), end = c(NA, "2014-04-22" )), .Names = c("start", "style", "content", "type", "end"), row.names = 35:36, class = "data.frame")

timevis(y)

[image: image] https://cloud.githubusercontent.com/assets/2775918/17422848/b64e7aa6-5a6a-11e6-8651-e311b30416e2.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/daattali/timevis/issues/8, or mute the thread https://github.com/notifications/unsubscribe-auth/AA6IFH3Eosv0wuQOg8np3NeucAF_vYpaks5qcobogaJpZM4JdQZV .

pssguy commented 7 years ago

LOL 5 weeks maybe. I have no js skills

daattali commented 7 years ago

I haven't tried this yet on a laptop but just from looking at that image, I think I can guess the problem. I'm assuming that the colour red is overwriting the blue line. Try instead of "red" using "rgba (255,0,0,0.1)" (that means red but with 90% opacity). It that works then there's no bug :) On Aug 4, 2016 6:18 PM, "Andrew Clark" notifications@github.com wrote:

LOL 5 weeks maybe. I have no js skills

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/daattali/timevis/issues/8#issuecomment-237731407, or mute the thread https://github.com/notifications/unsubscribe-auth/AA6IFDyE9XgCpBp18KuG7Yk_BQWGXpuaks5qco9NgaJpZM4JdQZV .

daattali commented 7 years ago

I just tried running what I said above, and it does indeed work

pssguy commented 7 years ago

Thanks You threw me at first on the "red", as I had used #FFFFFF, white! Like the idea of rgba, especially for 'background type