signalk-polar-performance-plugin 0.0.17 → 0.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "signalk-polar-performance-plugin",
3
- "version": "0.0.17",
3
+ "version": "0.0.18",
4
4
  "description": "A plugin that calculates performance information based on a (CSV) polar diagram.",
5
5
  "main": "plugin/index.js",
6
6
  "scripts": {
package/plugin/index.js CHANGED
@@ -562,7 +562,6 @@ module.exports = function (app) {
562
562
  pointRadius: [],
563
563
  borderColor: color[index],
564
564
  fill: false,
565
- parsing: false,
566
565
  label: tws + ' kts'
567
566
  }
568
567
  for (let twaIndex = 0; twaIndex <= twaArray.length-1; twaIndex++) {
package/public/index.html CHANGED
@@ -14,7 +14,6 @@ $.getJSON("/plugins/signalk-polar-performance-plugin/chartData", function(json)
14
14
 
15
15
  function showChart (data) {
16
16
  console.log(data)
17
-
18
17
  new Chart("myChart", {
19
18
  type: "scatter",
20
19
  data: data,
@@ -37,6 +36,23 @@ function showChart (data) {
37
36
  labelString: 'Target boat speed (POL SPD)'
38
37
  }
39
38
  }],
39
+ },
40
+ tooltips: {
41
+ enabled: true,
42
+ callbacks: {
43
+ label: function (tooltipItems, data) {
44
+ console.log("tooltipItems: " + JSON.stringify(tooltipItems))
45
+ console.log("data: " + data)
46
+ let label = tooltipItems.xLabel + "° " + tooltipItems.yLabel + " kts"
47
+ return label
48
+ }
49
+ },
50
+ backgroundColor: '#ddd',
51
+ titleFontSize: 16,
52
+ titleFontColor: '#0066ff',
53
+ bodyFontColor: '#333',
54
+ bodyFontSize: 16,
55
+ displayColors: false
40
56
  }
41
57
  }
42
58
  })