If you need to show dashed line for a line chart use the below code.
<Line type="linear" dataKey="trend" strokeDasharray="3 3"
stroke="#69C568" dot={{strokeDasharray: 'none'}} />
stroke="#69C568" dot={{strokeDasharray: 'none'}} />
You need to add property strokeDasharray="3 3" to the <Line /> You can change the values if needed.
The legend dots will also be plotted as dotted lines. If you want to remove that use the dot prop.
dot={{strokeDasharray: 'none'}}
No comments:
Post a Comment