Nikhilkoneru / react-d3-zoomable-sunburst

react-d3-zoomable-sunburst component has few awesome features over https://www.npmjs.com/package/react-zoomable-sunburst-d3-v4.Now component rerenders when there is a change in the props. We can also change the value which we need to use for calculations by passing value as a prop. Sunburst component is developed using a functional component and hooks.
MIT License
3 stars 2 forks source link

When use onSelect the tooltipContent stay visible #2

Closed adrienbecuwe closed 5 months ago

adrienbecuwe commented 4 years ago

when i add the props onSlect the tooltip but and stay visible after click.. morr you click nore you will see old tooltip visible


const [currentSelection, setCurrentSelection] = useState(0);
  const onSelect = (event) => {
      setCurrentSelection(event.data)
 }

      <Sunburst
          data={dataTest}
          scale={scale}
          tooltipContent={ <div class="sunburstTooltip" style="position:absolute; color:'#000000'; z-index:10; background: #FFFFFF; padding: 5px; text-align: center;" /> }
          tooltip
          keyId="Sunburst"
          width={width * 0.8}
          value={'size'}
          height={height * 0.8}
          onSelect={onSelect}
      />

Screenshot 2020-10-14 at 14 59 07

Screenshot 2020-10-14 at 14 59 58 Screenshot 2020-10-14 at 14 59 51

Nikhilkoneru commented 4 years ago

Hi Adrien Becuwe, will check and update this package tonight if it is necessary

Nikhilkoneru commented 4 years ago

Hi Adrien Becuwe, it is working perfectly in the example which I provided in this repository, can you reverify your issue?.

adrienbecuwe commented 4 years ago

Hi, if follow the example all works well. the problem is when i use onSelect.