Chartjs-Chart.js onClick function for bar graph 1 October 2023 by thecoderscamp.com 0👍 I think only this is needed var ctx = document.getElementById("mycanvas").getContext("2d"); Chartjs-YAxis control for stacked bar chart Source:stackexchange.com