-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start with zoom (custom granularity) on "now" #13
Comments
Hi @felixhayashi ,
Do you mean I should develop a feature not available in a backend library, into the frontend library ?? This is against by developing beliefs and code of good programming. This is unfortunate you cannot do maths, and in this case date maths, with TW5. I think you will have to write a small javascript macro for your need. However, I might take this need into account for the development of my datePicker plugin. I know moment.js provides very deep date maths, and TW5 could take great benefit from this. |
Noo, its very available in a backend library! But it requires javascript which I cannot use as a widget user. E.g. setting granularity to "hour" would require you to create a startdate=now-1hour and enddate=now+1hour.
Yes, this would be a solution as well. I could write a macro that calculates start and end dates based on "now". I just thought it is a common feature that makes sense being supported by your plugin... |
What about as a macro writer and user? I mean javascript macros. With access to moment.js. Which I load globally for another purpose (in browser mode only for now). It has to be tried. |
What a nice idea @kixam to expose it like this I'll test it the next time. Thanks! |
well, the |
Hi @kixam
I would really like to start with "now" being focussed and have a certain zoom level at the same time.
E.g. start with "now" and granularity "hours". I had a look at the vis options and this is not possible out of the box. The only way to achieve it is by setting start and end dates of the window (see almende/vis#144). Would it be possbile to have a TW5-visjsTimeline
option where I can do the following:
Thanks
-Felix
The text was updated successfully, but these errors were encountered: