1👍
✅
You can pass your own type to the ChartConfiguration
interface as a second parameter like so:
const lineChartData: ChartConfiguration<"line", { x: string, y: number }[]> = {
type: "line",
data: {
labels: [],
datasets: [
{
data: [
{ x: "test", y: 55 },
{ x: "hi", y: 20 },
],
},
],
},
};
Source:stackexchange.com