mirror of
https://github.com/bellingcat/ukraine-timemap.git
synced 2026-06-11 21:08:36 +03:00
Adjust y ticks height
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user