Skip to content

Commit

Permalink
Add condition for checking is legend selected in case of single point
Browse files Browse the repository at this point in the history
  • Loading branch information
Shubhabrata08 committed Mar 1, 2024
1 parent 9ef1039 commit 7aac617
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -564,6 +564,8 @@ export class LineChartBase extends React.Component<ILineChartProps, ILineChartSt
if (this._points[i].data.length === 1) {
const { x: x1, y: y1, xAxisCalloutData, xAxisCalloutAccessibilityData } = this._points[i].data[0];
const circleId = `${this._circleId}_${i}`;
const isLegendSelected: boolean =
this._legendHighlighted(legendVal) || this._noLegendHighlighted() || this.state.isSelectedLegend;
pointsForLine.push(
<circle
id={circleId}
Expand All @@ -572,6 +574,7 @@ export class LineChartBase extends React.Component<ILineChartProps, ILineChartSt
cx={this._xAxisScale(x1)}
cy={this._yAxisScale(y1)}
fill={activePoint === circleId ? theme!.semanticColors.bodyBackground : lineColor}
opacity={isLegendSelected ? 1 : 0.01}
onMouseOver={this._handleHover.bind(
this,
x1,
Expand Down

0 comments on commit 7aac617

Please sign in to comment.