1👍
You get an array containing all the active elements as second argument so if this array has a length of 0 no bar has been clicked and if it has a length greater then 0 a bar has been clicked:
options: {
onClick: function (evt, activeEls) {
if (activeEls.length === 0) {
alert("clicked outside of bar");
} else {
alert("clicked on bar");
}
}
}
Source:stackexchange.com