Adjust y ticks height

This commit is contained in:
Franc Camps-Febrer
2019-01-17 11:24:31 -05:00
parent 8cbc17e388
commit ec3ea5a7c7
2 changed files with 3 additions and 2 deletions

View File

@@ -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);