Actually I wanted to create a custom component for rechart using the component from the rechart library. When I try to render the data i am unable to see the output. Let me show you some example.
import { LineChart as ReLineChart} from 'recharts';
export class MyLine extends ReLine {
static defaultProps = {
...ReLine.defaultProps,
// Customized props
strokeWidth: 2,
dot: false,
};
}
When I use <MyLine /> it is rendering properly and I can see the output in the browser a Line drawn and I can also pass the props required in the jsx. But when I use a render function in the class component the line is not getting rendered. Can anyone provide me a solution to get it rendered
export class MyLine extends ReLine {
static defaultProps = {
...ReLine.defaultProps,
// Customized props
strokeWidth: 2,
dot: false,
};
render(){
return <div>{}</div>
}
Provide me a solution.