Hi Denil,
Not real sure what you are doing here. Are these code snippets from some sort of edit you made in the Chartjs widget?
The code seems a bit strange, to say the least.
Fixing these issues should get you a long way there.
If the parameter of the click function is e the evt does not exist here.
If you connect the click to the chart with $("#myChart") myBarChart probably does not exists here as well.
So my shot from a distance is:
$("#myChart").click(function(e) {
var activeBars = $("#myChart").getBarsAtEvent(e);
console.log(activeBars);
});