almende / vis

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

Custom array dates and names to show X-Axis labels #3747

Open MacGyver98 opened 6 years ago

MacGyver98 commented 6 years ago

Hi!

image

The blueones are background items, the colored are typical items. But, in the X-Axis labels i need to show specific dates and custom labels for each one..... How could I do this?

brichbe commented 6 years ago

Take a look at the custom formats example, which uses the timeline's format option.

MacGyver98 commented 6 years ago

@brichbe, @yotamberk, thanks, but is not enought. Yes, i can format minor and mayor labels, and I can stablish a scale var options = { timeAxis: {scale: 'day', step: 20} }. But I need a specific dates for this Axis like:

var xAxis = [ { name: 'A', date: '2018-01-01' }, { name: 'B', date: '2018-01-20' }, { name: 'C', date: '2018-02-12' }, { name: 'D', date: '2018-03-03' }, ... ]

MacGyver98 commented 6 years ago

@yotamberk, the Timeline tag is correct, why was removed?

brichbe commented 6 years ago

Can you post a working example on jsbin/jsfiddle to show what you've accomplished so far and what still needs to be done?