almende / vis

⚠️ This project is not maintained anymore! Please go to https://github.com/visjs
7.85k stars 1.48k forks source link

Using the timeline with numbers rather than dates. #4057

Open the-xperimentalist opened 6 years ago

the-xperimentalist commented 6 years ago

I was working in vis.js to represent a timeline in terms of number. Thus, I just want to create a timeline, while not mentioning the date with just normal numbers. Is there any workaround around this?

KalasinSeymour commented 6 years ago

Depends on the numeric format, you want to use. You could write your own custom label format. That worked for my case at least. But keep in mind that the timeline is intended to work with dates, that means you might have to deal with repetition issues. When working with numbers you will likely end up at the lowest scale unit (milliseconds).

You can find an example on custom labels listed on the example page or by looking it up in VisJS docs.