3
votes

How can I make my own x-axis with a specific dates array and particular label for each one?

Something like this...

enter image description here

enter image description here

These are every three weeks, but my necesity is a mark every blue group (colored are events), each group has a start and end dates

1
I am afraid that this feature is not yet supported in the library (github.com/almende/vis/issues/92). Next days I will try to find a solution, if I have some news I will answer here. - Lidakis Manolis

1 Answers

2
votes

You can customize the x-axis labels using a format function. E.g.,

  options: {
    showMinorLabels: false,
    timeAxis: { scale: 'day', step: 1 },
    format: {
      majorLabels: function (date, scale, step) {
        // return a custom label or "" depending on the date
      }
    }
  }