if (helpers.isDatasetVisible(dataset) && dataset.bar) {
++barCount;
}
- }, this);
+ });
return barCount;
},
helpers.each(this.getDataset().metaData, function(point, index) {
point.transition(easingDecimal);
point.draw();
- }, this);
+ });
},
var easingDecimal = ease || 1;
helpers.each(this.getDataset().metaData, function(arc, index) {
arc.transition(easingDecimal).draw();
- }, this);
+ });
},
setHoverStyle: function(arc) {
var easingDecimal = ease || 1;
// Transition Point Locations
- helpers.each(this.getDataset().metaData, function(point, index) {
+ helpers.each(this.getDataset().metaData, function(point) {
point.transition(easingDecimal);
- }, this);
+ });
// Transition and Draw the line
if (this.chart.options.showLines)
var easingDecimal = ease || 1;
helpers.each(this.getDataset().metaData, function(arc, index) {
arc.transition(easingDecimal).draw();
- }, this);
+ });
},
setHoverStyle: function(arc) {
// Transition Point Locations
helpers.each(this.getDataset().metaData, function(point, index) {
point.transition(easingDecimal);
- }, this);
+ });
// Transition and Draw the line
this.getDataset().metaDataset.transition(easingDecimal).draw();
if (this.options.scales.xAxes && this.options.scales.xAxes.length) {
helpers.each(this.options.scales.xAxes, function(xAxisOptions, index) {
xAxisOptions.id = xAxisOptions.id || (defaultXAxisID + index);
- }, this);
+ });
}
if (this.options.scales.yAxes && this.options.scales.yAxes.length) {
// Build the y axes
helpers.each(this.options.scales.yAxes, function(yAxisOptions, index) {
yAxisOptions.id = yAxisOptions.id || (defaultYAxisID + index);
- }, this);
+ });
}
}
},
resetElements: function resetElements() {
helpers.each(this.data.datasets, function(dataset, datasetIndex) {
dataset.controller.reset();
- }, this);
+ });
},
update: function update(animationDuration, lazy) {
// Make sure all dataset controllers have correct meta data counts
helpers.each(this.data.datasets, function(dataset, datasetIndex) {
dataset.controller.buildOrUpdateElements();
- }, this);
+ });
// This will loop through any data and do the appropriate element update for the type
helpers.each(this.data.datasets, function(dataset, datasetIndex) {
dataset.controller.update();
- }, this);
+ });
this.render(animationDuration, lazy);
},
if (helpers.isDatasetVisible(dataset)) {
dataset.controller.draw(ease);
}
- }, this);
+ });
// Finally draw the tooltip
this.tooltip.transition(easingDecimal).draw();
elementsArray.push(element);
return elementsArray;
}
- }, this);
+ });
}
- }, this);
+ });
return elementsArray;
},
if(helpers.isDatasetVisible(dataset)){
elementsArray.push(dataset.metaData[found._index]);
}
- }, this);
+ });
return elementsArray;
},
backgroundColor: active._view.backgroundColor
});
}
- }, this);
+ });
tooltipPosition = this.getAveragePosition(this._active);
tooltipPosition.y = this._active[0]._yScale.getPixelForDecimal(0.5);
ctx.font = helpers.fontString(vm.bodyFontSize, vm._bodyFontStyle, vm._bodyFontFamily);
helpers.each(vm.beforeBody.concat(vm.afterBody), function(line) {
size.width = Math.max(size.width, ctx.measureText(line).width);
- }, this);
+ });
helpers.each(vm.body, function(line) {
size.width = Math.max(size.width, ctx.measureText(line).width + (this._options.tooltips.mode !== 'single' ? (vm.bodyFontSize + 2) : 0));
}, this);
if (i + 1 === vm.title.length) {
pt.y += vm.titleMarginBottom - vm.titleSpacing; // If Last, add margin, remove spacing
}
- }, this);
+ });
}
},
drawBody: function drawBody(pt, vm, ctx, opacity) {
helpers.each(vm.footer, function(footer) {
ctx.fillText(footer, pt.x, pt.y);
pt.y += vm.footerFontSize + vm.footerSpacing;
- }, this);
+ });
}
},
draw: function draw() {