I need to move vertical line on HTML canvas using Chart.js.
I am using this:
this.chart.ctx.beginPath();
this.chart.ctx.moveTo(point.x, scale.startPoint + 24);
this.chart.ctx.strokeStyle = '#ff0000';
this.chart.ctx.lineTo(point.x, scale.endPoint);
this.chart.ctx.stroke();`
http://jsfiddle.net/dbyze2ga/377/ but what I need is to move the line to another index when button on the web page is clicked. I read about html canvas and found that it is "impossible" to remove line but then I found that: https://jsfiddle.net/ombaww9t/2/ and the line is moving.
So what I need is probably combination of those two examples.
Thanks for response.