From ff493738a279e524be82c3b9eda1e2ca33a3697e Mon Sep 17 00:00:00 2001 From: Mike Smiley Date: Tue, 24 Feb 2015 14:19:01 -0500 Subject: [PATCH] add datasetLabel for multiTooltip on dynamically-added points --- src/Chart.Bar.js | 1 + src/Chart.Line.js | 1 + src/Chart.Radar.js | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Chart.Bar.js b/src/Chart.Bar.js index 87fb26ddc..a3496841f 100644 --- a/src/Chart.Bar.js +++ b/src/Chart.Bar.js @@ -240,6 +240,7 @@ 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), diff --git a/src/Chart.Line.js b/src/Chart.Line.js index 34ad85b4d..561be5b7a 100644 --- a/src/Chart.Line.js +++ b/src/Chart.Line.js @@ -226,6 +226,7 @@ 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, diff --git a/src/Chart.Radar.js b/src/Chart.Radar.js index 134fd2d02..0c63761ab 100644 --- a/src/Chart.Radar.js +++ b/src/Chart.Radar.js @@ -245,6 +245,7 @@ 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, @@ -340,4 +341,4 @@ -}).call(this); \ No newline at end of file +}).call(this); -- 2.47.2