Skip to content

Commit 4feaea9

Browse files
kurkleetimberg
authored andcommitted
Small chores (#6740)
* Remove duplicate code * Migrate `xLabel` and `yLabel` from docs & samples
1 parent 76a89f0 commit 4feaea9

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

docs/configuration/tooltip.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ var chart = new Chart(ctx, {
136136
if (label) {
137137
label += ': ';
138138
}
139-
label += Math.round(tooltipItem.yLabel * 100) / 100;
139+
label += Math.round(tooltipItem.value * 100) / 100;
140140
return label;
141141
}
142142
}

samples/tooltips/custom-points.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757

5858
if (tooltip.dataPoints.length > 0) {
5959
tooltip.dataPoints.forEach(function(dataPoint) {
60-
var content = [dataPoint.xLabel, dataPoint.yLabel].join(': ');
60+
var content = [dataPoint.label, dataPoint.value].join(': ');
6161
var $tooltip = $('#tooltip-' + dataPoint.datasetIndex);
6262

6363
$tooltip.html(content);

src/scales/scale.category.js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ module.exports = Scale.extend({
1515
return first === -1 || first !== last ? index : first;
1616
},
1717

18-
_parseObject: function(obj, axis, index) {
19-
if (obj[axis] !== undefined) {
20-
return this._parse(obj[axis], index);
21-
}
22-
return null;
23-
},
24-
2518
determineDataLimits: function() {
2619
var me = this;
2720
var max = me._getLabels().length - 1;

0 commit comments

Comments
 (0)