#6281·recharts

Can not close tooltip programmatically

Author: sftskCreated Sep 5, 2025Updated Sep 10, 2026

What is the current behavior?

I used to do run

  chartRef.current?.setState({
      isTooltipActive: false,
  });

to close a tooltip as I am opening a different UI component (a modal) on click. When closing the modal it's stupid to still have the activeIndex set/ the tooltip shown.

With the changes in version 3 I can not close the tooltip anymore : https://recharts.org/en-US/guide/activeIndex From what I can tell there is no function to set the activeIndex, that would solve my issue if I can set it to -1.

What is the expected behavior?

Have a function to set activeIndex or close tooltip.

Which versions of Recharts, and which browser / OS are affected by this issue? Did this work in previous versions of Recharts?

>v3.0