daattali / timevis

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

Ordering based on id #76

Closed jamesLSI closed 3 years ago

jamesLSI commented 5 years ago

Hi,

I'm trying plot individual project bars (grouped) with a single milestone point below it but despite my best efforts can't get them to order. I've tried order, and subgroupOrder but to no avail. I want it to render: Project1 Milestone1 Project2 Milestone2

This code produces the most sensible outcome but still not quite right timevis(ForGantt, groups = ganttGroups, width = 1750, options = list(order = htmlwidgets::JS('function(a, b) { return b.order - a.order;}')))

Any advice?

Thanks James

vjcitn commented 5 years ago

+1 -- how do the events get ordered vertically within groups? one would like earliest to start on the top by default, and could benefit from more control

daattali commented 5 years ago

I'm not sure what the logic is. You can refer to the official documentation of the underlying library to see what they say about this feature http://visjs.org/docs/timeline/

rrodrigueznt commented 1 year ago

I'm not sure what the logic is. You can refer to the official documentation of the underlying library to see what they say about this feature http://visjs.org/docs/timeline/

Updated link to visjs documentation, https://visjs.github.io/vis-timeline/docs/timeline/

And URL to the page talking about items ordering, https://visjs.github.io/vis-timeline/examples/timeline/items/itemOrdering.html

Please, could anybody point us to an example to learn how to use visjs configuration options from timevis? Thanks!