From 7a231313668f3b3dfe949dabd2c8da69f9088c55 Mon Sep 17 00:00:00 2001 From: Nick Downie Date: Wed, 2 Jul 2014 21:27:03 +0100 Subject: [PATCH] Add datasetLabel to elements for tooltip templates --- src/Chart.Bar.js | 1 + src/Chart.Line.js | 3 +-- src/Chart.Radar.js | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) 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, -- 2.47.2