Skip to content

Commit 5ba5cbe

Browse files
authored
dodge line on x-axis too, and go up instead of down
1 parent 830d395 commit 5ba5cbe

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/js/time_line.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export class time_line {
9898
.style('stroke-width', '2px')
9999
.attr('id', (d) => d.key)
100100
.attr('d', (d) => line(d.values))
101-
.style('transform', (d) => (d.values[0].plan == 'plan' ? '' : 'translateY(8px)'));
101+
.style('transform', (d) => (d.values[0].plan == 'plan' ? '' : 'translate(-8px, -8px)'));
102102

103103
// Add dots for datapoints
104104
svg
@@ -115,7 +115,7 @@ export class time_line {
115115
.attr('y_value', (d) => d.value)
116116
.attr('cx', (d) => x(parseYear(d.year)))
117117
.attr('cy', (d) => y(d.value))
118-
.style('transform', (d) => (d.plan == 'plan' ? '' : 'translate(8px, 8px)'))
118+
.style('transform', (d) => (d.plan == 'plan' ? '' : 'translate(-8px, -8px)'))
119119
.on('mouseover', mouseover)
120120
.on('mousemove', mousemove)
121121
.on('mouseout', mouseout);

0 commit comments

Comments
 (0)