}
+ this.tooltip.pivot();
+
// Hover animations
if(!this.animating){
var changed;
(this.lastActive.length && !this.active.length)||
(this.lastActive.length && this.active.length && changed)){
- this.tooltip.pivot();
this.stop();
this.render(this.options.hoverAnimationDuration);
}
this.scale.update();
- this.eachElement(function(bar, index, datasetIndex){
+ this.eachElement(function(bar, index, dataset, datasetIndex){
helpers.extend(bar, {
width : this.scale.calculateBarWidth(this.data.datasets.length),
x: this.scale.calculateBarX(this.data.datasets.length, datasetIndex, index),
var vm = this._vm;
return vm.base - vm.y;
},
- inRange : function(chartX,chartY){
+ inRange : function(mouseX,mouseY){
var vm = this._vm;
if (vm.y < vm.base){
- return (chartX >= vm.x - vm.width/2 && chartX <= vm.x + vm.width/2) && (chartY >= vm.y && chartY <= vm.base);
+ return (mouseX >= vm.x - vm.width/2 && mouseX <= vm.x + vm.width/2) && (mouseY >= vm.y && mouseY <= vm.base);
} else{
- return (chartX >= vm.x - vm.width / 2 && chartX <= vm.x + vm.width / 2) && (chartY >= vm.base && chartY <= vm.y);
+ return (mouseX >= vm.x - vm.width / 2 && mouseX <= vm.x + vm.width / 2) && (mouseY >= vm.base && mouseY <= vm.y);
}
},
+ inGroupRange: function(mouseX){
+ var vm = this._vm;
+ return (mouseX >= vm.x - vm.width/2 && mouseX <= vm.x + vm.width/2);
+ },
tooltipPosition : function(){
var vm = this._vm;
if (vm.y < vm.base){