JSainsburyPLC / react-timelines

React Timelines Library
https://jsainsburyplc.github.io/react-timelines/
MIT License
257 stars 118 forks source link

Is there an API? Do the elements support drag n drop? #121

Open bingle87 opened 4 years ago

bingle87 commented 4 years ago

Can someone lease point me to documentation. Thanks.

jsomsanith-tlnd commented 4 years ago

I am trying to look at this lib too, but it doesn't seem to have any documentation, and it doesn't seem maintained neither :( Is there any maintainer who can prove me wrong ?

RailsCod3rFuture commented 4 years ago

This is the best looking timeline plugin and its impossible to utilize..............Would love to know how to show the days underneath the month and add tracks with a button click.

atkinchris commented 4 years ago

Sorry there's no API documentation for the components - the library is largely unmaintained at the moment. A demo is included, that was originally written to showcase the timeline internally.


@RailsCod3rFuture - you can add other rows to the timebar by passing them in to the timebar prop. A good example is the quarters and months seen in the demo here: https://github.com/JSainsburyPLC/react-timelines/blob/master/demo/src/builders.js#L51-L65. Each cell takes an start and end Date for it's width.

Adding tracks with a button click would be very similar. Your application controls the tracks that are shown, by passing them as an array in the tracks prop. You can add, remove and rearrange elements in this array as you like - the timeline will just rerender.