I need some help.
I am developing a project in React JS. I am using react-chartjs-2 for displaying charts. I have to add a range slider for the chart to control values on x-axis and two vertical lines. The position of one vertical line on the chart is controlled by the range slider. I somehow managed to solve this problem. Another line has to be displayed at a specific point(calculated using an equation). I am able to draw this line as well. Actually, I am drawing lines on the chart's canvas.
But the problem is that when I get a new point using the equation, I have to remove the vertical line at the previous point. How can I do that? I have tried all the solutions on StackOverflow, but couldn't solve this problem.