-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Export props interfaces/types for Legend and Line #2899
Comments
https://github.com/recharts/recharts/blob/master/src/component/Legend.tsx line 41 exports Legend props. |
When using the code from the example, there is an error here: const renderLegend = (props: LegendProps) => {
const { payload } = props;
return payload ? (
<ul>
{payload.map((entry, index) => (
<li key={`item-${index}`}>{entry.value}</li>
))}
</ul>
) : null;
};
<Legend content={renderLegend} />
|
I am also facing this issue for LineProps, are we going to fix this anytime soon? |
Any resolution on this? |
https://codesandbox.io/s/simple-line-chart-forked-gdvzcn?file=/src/App.tsx So in the latest alpha (2.7.0-alpha.0) Is there still an issue with |
Still an issue with Temporary workaround is Feel free to make a PR |
I am trying to export
LegendProps
andLineProps
from recharts but while using<Legend {..props}/>
and<Line {..props} />
. I am getting following error.Also, I see that the same issue was fixed for
Area
. Hoping to get it fixed forLegend
andLine
.Here is the link of that fixe issue 2156
The text was updated successfully, but these errors were encountered: