Skip to content

Commit 7bf0006

Browse files
authored
fix: highlightChartItems api method behavior (#68)
1 parent e58d1cc commit 7bf0006

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/core/chart-api/index.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,10 @@ export class ChartAPI {
209209
// Callbacks used for hover and keyboard navigation, and also exposed to the public API to give the ability
210210
// to highlight and show tooltip for the given point or group manually.
211211
public highlightChartItems = (itemIds: readonly string[]) => {
212-
this.chartExtraHighlight.highlightChartItems(itemIds);
212+
if (!this.isTooltipPinned) {
213+
this.chartExtraHighlight.highlightChartItems(itemIds);
214+
this.chartExtraLegend.onHighlightItems(itemIds);
215+
}
213216
};
214217
public setItemsVisible = (visibleItemsIds: readonly string[], { isApiCall }: { isApiCall: boolean }) => {
215218
this.chartExtraLegend.onItemVisibilityChange(visibleItemsIds, { isApiCall });

0 commit comments

Comments
 (0)