Browse Source

Fixed #1637: the built-in tooltip now shows the provided `xLabel`, `yLabel`, and `zLabel`

instead of `'x'`, `'y'`, and `'z'`
codeClimate
jos 8 years ago
parent
commit
1e1f59a7a4
2 changed files with 8 additions and 3 deletions
  1. +5
    -0
      HISTORY.md
  2. +3
    -3
      lib/graph3d/Graph3d.js

+ 5
- 0
HISTORY.md View File

@ -12,6 +12,11 @@ http://visjs.org
- Fixed #1630: method `getDataRange` was wrongly called `getItemRange` in docs.
### Graph3d
- The built-in tooltip now shows the provided `xLabel`, `yLabel`, and `zLabel`
instead of `'x'`, `'y'`, and `'z'`. Thanks @jacklightbody.
## 2016-02-04, version 4.14.0

+ 3
- 3
lib/graph3d/Graph3d.js View File

@ -2237,9 +2237,9 @@ Graph3d.prototype._showTooltip = function (dataPoint) {
}
else {
content.innerHTML = '<table>' +
'<tr><td>x:</td><td>' + dataPoint.point.x + '</td></tr>' +
'<tr><td>y:</td><td>' + dataPoint.point.y + '</td></tr>' +
'<tr><td>z:</td><td>' + dataPoint.point.z + '</td></tr>' +
'<tr><td>' + this.xLabel + ':</td><td>' + dataPoint.point.x + '</td></tr>' +
'<tr><td>' + this.yLabel + ':</td><td>' + dataPoint.point.y + '</td></tr>' +
'<tr><td>' + this.zLabel + ':</td><td>' + dataPoint.point.z + '</td></tr>' +
'</table>';
}

Loading…
Cancel
Save