The "data" object which you have to give to create a Multi-Type chart requires you to specify a "type" other than "bar", (Click here to see the offending line.) but the import {Bar} from 'react-chartjs-2' type does not allow for any other value for type besides "bar".
Workaround:
Right now I've just set //@ts-expect-error for the offending line type: 'line', which solves the problem.
A minor issue, but also a very quick fix so I thought it was worth posting.
Using typescript.
Reproduce:
Simply try out the official "MultyType" chart example in typescript.
Problem:
The "data" object which you have to give to create a Multi-Type chart requires you to specify a "type" other than "bar", (Click here to see the offending line.) but the
import {Bar} from 'react-chartjs-2'
type does not allow for any other value for type besides "bar".Workaround:
Right now I've just set
//@ts-expect-error
for the offending linetype: 'line'
, which solves the problem.A minor issue, but also a very quick fix so I thought it was worth posting.