jiahuang / d3-timeline

Simple JS timeline plugin for d3
1.03k stars 281 forks source link

adds option to only tick at block start #107

Open jmbeach opened 5 years ago

jmbeach commented 5 years ago

Adds an option to solve the feature request in issue #102.

Use the new option atBlockStart: true as part of the tickFormat method.

Ex:

d3.timeline().tickFormat({ atBlockStart: true })

Also adds hideOverlapTicks options (which only works with atBlockStart).

hideOverlapTicks is an amount of ticks to not allow two timestamps to be drawn next to eachother and prevents two timestamps from overlapping.

Ex 1: atBlockStart: true:

image

Ex 2: atBlockStart: true, hideOperlapTicks 2700000 (45 min)

image