]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
Add datasetLabel to elements for tooltip templates 414/head
authorNick Downie <hello@nickdownie.com>
Wed, 2 Jul 2014 20:27:03 +0000 (21:27 +0100)
committerNick Downie <hello@nickdownie.com>
Wed, 2 Jul 2014 20:27:03 +0000 (21:27 +0100)
src/Chart.Bar.js
src/Chart.Line.js
src/Chart.Radar.js

index 7a480095b4bfc7a1ba1f44c1f541e07f12340513..aca50d82f3ed53eed92a6e635817f1d4a51c6d5a 100644 (file)
                                                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,
index 65a753533ff93311ac518b013ac3829a2914e941..ff99d5e554b07ebc0b48d068923f415e706c7614 100644 (file)
                                                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,
index 9f9a06f0aed1969b9d45bb7f47c5dbbbc74c99e5..7bb9df859d791ea8bd48ced8fd1e60193adafe69 100644 (file)
                                                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,