12

I was trying to disable animation in this way:

<ResponsiveContainer width="99%" height={300}>
    <LineChart isAnimationActive={false}
               animationDuration={0}
               height={300} width={400}
               data={chartData}>
        ...
    </LineChart>
</ResponsiveContainer>

But it doesn't work

Gregory Orlov
  • 517
  • 1
  • 6
  • 15

1 Answers1

23

You need to disable the animations at line level.

<ResponsiveContainer width="99%" height={300}>
    <LineChart height={300} width={400} data={chartData}>
        <Line type="monotone" isAnimationActive={false} dataKey="pv" />
        <Line type="monotone" isAnimationActive={false} dataKey="uv" />
    </LineChart>
</ResponsiveContainer>

Check this JSFiddle to see an example.

Matthijs van der Veer
  • 3,865
  • 2
  • 12
  • 22