Skip to content

Commit

Permalink
🐛 gray out non-focused multi-color lines
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann committed Dec 12, 2024
1 parent 9691515 commit 18bf8b7
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions packages/@ourworldindata/grapher/src/lineCharts/LineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -200,25 +200,26 @@ class Lines extends React.Component<LinesProps> {
/>
)

const line = this.props.multiColor ? (
<MultiColorPolyline
id={makeIdForHumanConsumption("line", series.seriesName)}
points={series.placedPoints}
strokeLinejoin="round"
strokeWidth={strokeWidth}
strokeDasharray={strokeDasharray}
strokeOpacity={strokeOpacity}
/>
) : (
<LinePath
id={makeIdForHumanConsumption("line", series.seriesName)}
placedPoints={series.placedPoints}
stroke={color}
strokeWidth={strokeWidth}
strokeOpacity={strokeOpacity}
strokeDasharray={strokeDasharray}
/>
)
const line =
this.props.multiColor && !focus.background ? (
<MultiColorPolyline
id={makeIdForHumanConsumption("line", series.seriesName)}
points={series.placedPoints}
strokeLinejoin="round"
strokeWidth={strokeWidth}
strokeDasharray={strokeDasharray}
strokeOpacity={strokeOpacity}
/>
) : (
<LinePath
id={makeIdForHumanConsumption("line", series.seriesName)}
placedPoints={series.placedPoints}
stroke={color}
strokeWidth={strokeWidth}
strokeOpacity={strokeOpacity}
strokeDasharray={strokeDasharray}
/>
)

return (
<>
Expand Down

0 comments on commit 18bf8b7

Please sign in to comment.