I am trying to add some more data to my customized Tooltip other than the data available by default. Now, I want to write a type for such a tooltip, already seen one of the solutions which has not passed anything else other than the props which recharts chart internally passes to the custom tooltip.
The solution I am referring to above: Typescript Interface for Recharts Custom Tooltip
my code:
<Tooltip content={ <CustomToolTipComponent detailsType={detailsType} selectedItemUnit={selectedItemUnit} /> } />
I am using this tooltip for a Line Chart.
I tried searching for more solutions to it but can't find anything on recharts documentation and on any other platforms till now. The solution I mentioned above provides the inbuilt type for the collection of data passed to the Tooltip by default but doesn't give scope to add any other data type to it.