vis-timeline
vis-timeline copied to clipboard
Style odd /even for days ?
How i can style odd/even days ?
as example: odd days -> background-color: white; even days -> background-color: lightgrey;
I came accross the same thing and found no answer on how to configure the timeline.
In the end I helped myself by setting the className:
of every even group id to odd-days
and of every odd group id to odd-day
.
But this requires that the groups are sorted with the option groupOrder: 'id'
Nice workaround, but it looks like that works only for groups, right ? I search for a solution for the next 20-30 days in horizontal view.
Please see this example on how to style even/odd entries: https://visjs.github.io/vis-timeline/examples/timeline/styling/gridStyling.html