diff --git a/src/components/Timeline.jsx b/src/components/Timeline.jsx index a05c5e3..5c42e17 100644 --- a/src/components/Timeline.jsx +++ b/src/components/Timeline.jsx @@ -82,7 +82,8 @@ class Timeline extends React.Component { } makeScaleY(categories) { - const catsYpos = categories.map((g, i) => (i + 1) * this.state.dims.trackHeight / categories.length); + const tickHeight = 15; + const catsYpos = categories.map((g, i) => (i + 1) * this.state.dims.trackHeight / categories.length + tickHeight / 2); return d3.scaleOrdinal() .domain(categories) .range(catsYpos); diff --git a/src/components/TimelineCategories.jsx b/src/components/TimelineCategories.jsx index d1cd15f..c90697c 100644 --- a/src/components/TimelineCategories.jsx +++ b/src/components/TimelineCategories.jsx @@ -25,7 +25,7 @@ class TimelineCategories extends React.Component { } getY(idx) { - return (idx + 1) * this.props.dims.trackHeight / this.props.categories.length + return (idx + 1) * this.props.dims.trackHeight / this.props.categories.length + 7.5; } renderCategory(category, idx) {