There is a plotted chartjs chart, and prototype.draw draws a vertical line. How to move the label of vertical lines down, if it goes beyond the canvas and is not displayed?
Chart.elements.Line.prototype.draw = function () { this._chart.ctx.save(); this._chart.ctx.strokeStyle = '#808080'; var points = this._chart.getDatasetMeta(0).data, point_x = points[points.length - 1]._model.x, point_y = points[points.length - 1]._model.y, bottom = this._chart.scales['y-axis-0'].bottom; this._chart.ctx.beginPath(); this._chart.ctx.lineWidth = 3; this._chart.ctx.moveTo(point_x, point_y); this._chart.ctx.lineTo(point_x, bottom); this._chart.ctx.textAlign = 'right'; this._chart.ctx.fillStyle = '#808080'; if ($(window).width() < 420) { this._chart.ctx.font = '500 14px "Montserrat", sans-serif'; this._chart.ctx.fillText("Окупність", point_x - 2, bottom - 14); } else { this._chart.ctx.font = '500 16px "Montserrat", sans-serif'; this._chart.ctx.fillText("Окупність", point_x - 5, bottom + 24); } this._chart.ctx.stroke(); this._chart.ctx.restore(); }