almende / vis

⚠️ This project is not maintained anymore! Please go to https://github.com/visjs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can unit for event can be seconds or ms instead of date?

christophepersoz opened this issue · comments

I like the way your library is working, but I’m looking for a much smaller timerange event than days, months years.
Do you think that can be easily done or implement? - maybe I can help on this.

Thanks!

Found by using the timeline in milliseconds unit and using minorLabels and majorLabels options to generate frame en TC values on axis.

                /* in options {} */
                format: {
			minorLabels: function(date, scale, step) {
				return get_frame_from_ms( new Date(date).getTime() );
			},
			majorLabels: function(date, scale, step) {
				return get_TC_from_ms( new Date(date).getTime() );
			}
		},
                /* others options here below */

Perfect lib! Thanks