From: Nick Downie Date: Wed, 2 Jul 2014 20:27:03 +0000 (+0100) Subject: Add datasetLabel to elements for tooltip templates X-Git-Tag: v1.0.1-beta.2~5^2 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=refs%2Fpull%2F414%2Fhead;p=thirdparty%2FChart.js.git Add datasetLabel to elements for tooltip templates --- diff --git a/src/Chart.Bar.js b/src/Chart.Bar.js index 7a480095b..aca50d82f 100644 --- a/src/Chart.Bar.js +++ b/src/Chart.Bar.js @@ -109,6 +109,7 @@ datasetObject.bars.push(new this.BarClass({ value : dataPoint, label : data.labels[index], + datasetLabel: dataset.label, strokeColor : dataset.strokeColor, fillColor : dataset.fillColor, highlightFill : dataset.highlightFill || dataset.fillColor, diff --git a/src/Chart.Line.js b/src/Chart.Line.js index 65a753533..ff99d5e55 100644 --- a/src/Chart.Line.js +++ b/src/Chart.Line.js @@ -104,8 +104,7 @@ datasetObject.points.push(new this.PointClass({ value : dataPoint, label : data.labels[index], - // x: this.scale.calculateX(index), - // y: this.scale.endPoint, + datasetLabel: dataset.label, strokeColor : dataset.pointStrokeColor, fillColor : dataset.pointColor, highlightFill : dataset.pointHighlightFill || dataset.pointColor, diff --git a/src/Chart.Radar.js b/src/Chart.Radar.js index 9f9a06f0a..7bb9df859 100644 --- a/src/Chart.Radar.js +++ b/src/Chart.Radar.js @@ -121,6 +121,7 @@ datasetObject.points.push(new this.PointClass({ value : dataPoint, label : data.labels[index], + datasetLabel: dataset.label, x: (this.options.animation) ? this.scale.xCenter : pointPosition.x, y: (this.options.animation) ? this.scale.yCenter : pointPosition.y, strokeColor : dataset.pointStrokeColor,