Skip to content

Commit

Permalink
dodge lines in emission intensity timeline plot (#171)
Browse files Browse the repository at this point in the history
- closes #142
  • Loading branch information
cjyetman authored Dec 12, 2024
1 parent 51eb1cd commit 9905962
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/js/time_line.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ export class time_line {
.style('stroke', (d) => (d.values[0].plan == 'plan' ? line_color : scen_line_color))
.style('stroke-width', '2px')
.attr('id', (d) => d.key)
.attr('d', (d) => line(d.values));
.attr('d', (d) => line(d.values))
.style('transform', (d) => (d.values[0].plan == 'plan' ? '' : 'translate(8px, -8px)'));

// Add dots for datapoints
svg
Expand All @@ -114,6 +115,7 @@ export class time_line {
.attr('y_value', (d) => d.value)
.attr('cx', (d) => x(parseYear(d.year)))
.attr('cy', (d) => y(d.value))
.style('transform', (d) => (d.plan == 'plan' ? '' : 'translate(8px, -8px)'))
.on('mouseover', mouseover)
.on('mousemove', mousemove)
.on('mouseout', mouseout);
Expand Down

0 comments on commit 9905962

Please sign in to comment.