Skip to content

Commit

Permalink
🐛 (line) dismiss projection line on deselecting an entity (#4322)
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamersmann authored Dec 17, 2024
1 parent c721d47 commit 5c6ceee
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/@ourworldindata/grapher/src/lineCharts/LineChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -240,16 +240,13 @@ class Lines extends React.Component<LinesProps> {
const opacity = series.hover.background ? GRAPHER_OPACITY_MUTE : 1

return (
<g
id={makeIdForHumanConsumption("markers", series.seriesName)}
key={getSeriesKey(series, "markers")}
>
<g id={makeIdForHumanConsumption("markers", series.seriesName)}>
{series.placedPoints.map((value, index) => (
<circle
id={makeIdForHumanConsumption(
horizontalAxis.formatTick(value.time)
)}
key={index}
key={`${value}-${index}`}
cx={value.x}
cy={value.y}
r={this.markerRadius}
Expand All @@ -265,7 +262,7 @@ class Lines extends React.Component<LinesProps> {
return (
<>
{this.props.series.map((series) => (
<React.Fragment key={series.seriesName}>
<React.Fragment key={getSeriesKey(series)}>
{this.renderLine(series)}
{this.renderLineMarkers(series)}
</React.Fragment>
Expand Down

0 comments on commit 5c6ceee

Please sign in to comment.