how do i create a gradient line in typescript?

Change const data = (canvas: { getContext: (arg0: string) => any; }) to

const data = (canvas: HTMLCanvasElement) => {}

And in the return do

<Line options={options} data={data(canvasRef)} />

You will have to pass the ref of your canvas element to the data function

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top