]> git.ipfire.org Git - thirdparty/Chart.js.git/commitdiff
add datasetLabel for multiTooltip on dynamically-added points 952/head
authorMike Smiley <msmiley@alumni.rice.edu>
Tue, 24 Feb 2015 19:19:01 +0000 (14:19 -0500)
committerMike Smiley <msmiley@alumni.rice.edu>
Tue, 24 Feb 2015 19:19:01 +0000 (14:19 -0500)
src/Chart.Bar.js
src/Chart.Line.js
src/Chart.Radar.js

index 87fb26ddc405267419abcaa749b76435ee3340cc..a3496841fc5825a1a5f3688212196e522ec81caf 100644 (file)
                                this.datasets[datasetIndex].bars.push(new this.BarClass({
                                        value : value,
                                        label : label,
+                                       datasetLabel: this.datasets[datasetIndex].label,
                                        x: this.scale.calculateBarX(this.datasets.length, datasetIndex, this.scale.valuesCount+1),
                                        y: this.scale.endPoint,
                                        width : this.scale.calculateBarWidth(this.datasets.length),
index 34ad85b4d0ae1ae96b40b506385ae42547ef6063..561be5b7af7962b75e2e59c777b9c5ae4b8d412d 100644 (file)
                                this.datasets[datasetIndex].points.push(new this.PointClass({
                                        value : value,
                                        label : label,
+                                       datasetLabel: this.datasets[datasetIndex].label,
                                        x: this.scale.calculateX(this.scale.valuesCount+1),
                                        y: this.scale.endPoint,
                                        strokeColor : this.datasets[datasetIndex].pointStrokeColor,
index 134fd2d021866ccf25cdc4902b3d1f8de59b36ba..0c63761abd0f82943caee9876fdd55c16cd40550 100644 (file)
                                this.datasets[datasetIndex].points.push(new this.PointClass({
                                        value : value,
                                        label : label,
+                                       datasetLabel: this.datasets[datasetIndex].label,
                                        x: pointPosition.x,
                                        y: pointPosition.y,
                                        strokeColor : this.datasets[datasetIndex].pointStrokeColor,
 
 
 
-}).call(this);
\ No newline at end of file
+}).call(this);