Chartjs-JSX element type 'Line' is not a constructor function for JSX elements

2👍

The Line component is exported by react-chartjs-2 as a named export. You need to import it by its name:

import {Line} from 'react-chartjs-2';

Live Example:

Edit laughing-cdn-3qp5q

Leave a comment