@raruto/leaflet-elevation 1.7.6 → 1.8.0
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/README.md +14 -0
- package/dist/leaflet-elevation.js +506 -737
- package/dist/leaflet-elevation.js.map +1 -1
- package/dist/leaflet-elevation.min.js +2 -2
- package/dist/leaflet-elevation.min.js.map +1 -1
- package/package.json +1 -1
- package/src/acceleration.js +10 -20
- package/src/altitude.js +18 -25
- package/src/chart.js +54 -153
- package/src/components.js +130 -94
- package/src/control.js +111 -207
- package/src/distance.js +12 -15
- package/src/marker.js +38 -81
- package/src/options.js +0 -8
- package/src/slope.js +8 -17
- package/src/speed.js +9 -19
- package/src/time.js +7 -7
- package/src/utils.js +77 -99
package/package.json
CHANGED
package/src/acceleration.js
CHANGED
|
@@ -10,8 +10,8 @@ Elevation.addInitHook(function() {
|
|
|
10
10
|
let opts = this.options;
|
|
11
11
|
let acceleration = {};
|
|
12
12
|
|
|
13
|
-
acceleration.label
|
|
14
|
-
|
|
13
|
+
acceleration.label = opts.accelerationLabel || L._(opts.imperial ? 'ft/s²' : 'm/s²');
|
|
14
|
+
opts.accelerationFactor = opts.accelerationFactor || 1;
|
|
15
15
|
|
|
16
16
|
if (this.options.acceleration != "summary") {
|
|
17
17
|
|
|
@@ -61,8 +61,8 @@ Elevation.addInitHook(function() {
|
|
|
61
61
|
if (deltaT > 0) {
|
|
62
62
|
let curr = data[i].speed;
|
|
63
63
|
let prev = i > 0 ? data[i - 1].speed : curr;
|
|
64
|
-
let delta = (curr - prev) * (1000 /
|
|
65
|
-
acceleration = Math.abs((delta / deltaT)) *
|
|
64
|
+
let delta = (curr - prev) * (1000 / opts.timeFactor);
|
|
65
|
+
acceleration = Math.abs((delta / deltaT)) * opts.accelerationFactor;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
68
|
// Try to smooth "crazy" acceleration values.
|
|
@@ -75,26 +75,16 @@ Elevation.addInitHook(function() {
|
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
// Range of acceptable acceleration values.
|
|
78
|
-
|
|
79
|
-
let range = this.options.accelerationRange;
|
|
80
|
-
if (acceleration < range[0]) acceleration = range[0];
|
|
81
|
-
else if (acceleration > range[1]) acceleration = range[1];
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
acceleration = L.Util.formatNum(acceleration, 2);
|
|
85
|
-
|
|
86
|
-
if (acceleration > sMax) sMax = acceleration;
|
|
87
|
-
if (acceleration < sMin) sMin = acceleration;
|
|
88
|
-
sAvg = (acceleration + sAvg) / 2.0;
|
|
78
|
+
acceleration = _.clamp(acceleration, this.options.accelerationRange);
|
|
89
79
|
|
|
90
|
-
|
|
80
|
+
track.acceleration_max = acceleration > sMax ? acceleration : sMax;
|
|
81
|
+
track.acceleration_min = acceleration < sMin ? acceleration : sMin;
|
|
82
|
+
track.acceleration_avg = (acceleration + sAvg) / 2.0;
|
|
91
83
|
|
|
92
|
-
|
|
93
|
-
track.acceleration_min = sMin;
|
|
94
|
-
track.acceleration_avg = sAvg;
|
|
84
|
+
data[i].acceleration = L.Util.formatNum(acceleration, 2);
|
|
95
85
|
});
|
|
96
86
|
|
|
97
|
-
this.
|
|
87
|
+
this._registerTooltip({
|
|
98
88
|
name : 'acceleration',
|
|
99
89
|
chart: (item) => L._("a: ") + item.acceleration + " " + acceleration.label,
|
|
100
90
|
marker: (item) => Math.round(item.acceleration) + " " + acceleration.label,
|
package/src/altitude.js
CHANGED
|
@@ -9,21 +9,21 @@ Elevation.addInitHook(function() {
|
|
|
9
9
|
let altitude = {};
|
|
10
10
|
|
|
11
11
|
if (opts.imperial) {
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
opts.altitudeFactor = this.__footFactor;
|
|
13
|
+
altitude.label = "ft";
|
|
14
14
|
} else {
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
opts.altitudeFactor = opts.heightFactor || opts.altitudeFactor || 1;
|
|
16
|
+
altitude.label = opts.yLabel;
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
this.on("eledata_updated", function(e) {
|
|
20
20
|
let data = this._data;
|
|
21
21
|
let i = e.index;
|
|
22
|
-
let z = data[i].z *
|
|
22
|
+
let z = data[i].z * opts.altitudeFactor;
|
|
23
23
|
|
|
24
24
|
let track = this.track_info;
|
|
25
|
-
let
|
|
26
|
-
let
|
|
25
|
+
let zMax = track.elevation_max || -Infinity;
|
|
26
|
+
let zMin = track.elevation_min || +Infinity;
|
|
27
27
|
|
|
28
28
|
// check and fix missing elevation data on last added point
|
|
29
29
|
if (!this.options.skipNullZCoords && i > 0) {
|
|
@@ -44,15 +44,13 @@ Elevation.addInitHook(function() {
|
|
|
44
44
|
}
|
|
45
45
|
// skip point if it has not elevation
|
|
46
46
|
if (!isNaN(z)) {
|
|
47
|
-
eleMax = eleMax < z ? z : eleMax;
|
|
48
|
-
eleMin = eleMin > z ? z : eleMin;
|
|
49
47
|
this._lastValidZ = z;
|
|
50
48
|
}
|
|
51
49
|
|
|
52
|
-
|
|
50
|
+
track.elevation_max = z > zMax ? z : zMax;
|
|
51
|
+
track.elevation_min = z < zMin ? z : zMin;
|
|
53
52
|
|
|
54
|
-
|
|
55
|
-
track.elevation_min = eleMin;
|
|
53
|
+
data[i].z = z;
|
|
56
54
|
});
|
|
57
55
|
|
|
58
56
|
this.on("elechart_axis", function() {
|
|
@@ -69,13 +67,10 @@ Elevation.addInitHook(function() {
|
|
|
69
67
|
|
|
70
68
|
this.on("elechart_axis", function() {
|
|
71
69
|
|
|
72
|
-
altitude.y = this._chart._y;
|
|
73
|
-
altitude.label = this._yLabel;
|
|
74
|
-
|
|
75
70
|
this._chart._registerAxisScale({
|
|
76
71
|
axis : "y",
|
|
77
72
|
position: "left",
|
|
78
|
-
scale :
|
|
73
|
+
scale : this._chart._y,
|
|
79
74
|
label : altitude.label,
|
|
80
75
|
labelX : -3,
|
|
81
76
|
labelY : -8,
|
|
@@ -88,8 +83,6 @@ Elevation.addInitHook(function() {
|
|
|
88
83
|
|
|
89
84
|
let theme = this.options.theme.replace('-theme', '');
|
|
90
85
|
let color = D3.Colors[theme] || {};
|
|
91
|
-
let alpha = (this.options.detached ? (color.alpha || '0.8') : 1);
|
|
92
|
-
let stroke = (this.options.detached ? color.stroke : false);
|
|
93
86
|
|
|
94
87
|
this._chart._registerAreaPath({
|
|
95
88
|
name : 'altitude',
|
|
@@ -97,9 +90,9 @@ Elevation.addInitHook(function() {
|
|
|
97
90
|
scaleX : 'distance',
|
|
98
91
|
scaleY : 'altitude',
|
|
99
92
|
color : color.area || theme,
|
|
100
|
-
strokeColor : stroke
|
|
93
|
+
strokeColor : this.options.detached ? color.stroke : '#000',
|
|
101
94
|
strokeOpacity: "1",
|
|
102
|
-
fillOpacity : alpha,
|
|
95
|
+
fillOpacity : this.options.detached ? (color.alpha || '0.8') : 1,
|
|
103
96
|
preferCanvas : this.options.preferCanvas,
|
|
104
97
|
});
|
|
105
98
|
|
|
@@ -107,20 +100,20 @@ Elevation.addInitHook(function() {
|
|
|
107
100
|
|
|
108
101
|
}
|
|
109
102
|
|
|
110
|
-
this.
|
|
103
|
+
this._registerTooltip({
|
|
111
104
|
name: 'y',
|
|
112
|
-
chart: (item) => L._("y: ") + d3.format("." + opts.decimalsY + "f")(item[opts.yAttr]) + " " +
|
|
113
|
-
marker: (item) => d3.format("." + opts.decimalsY + "f")(item[opts.yAttr]) + " " +
|
|
105
|
+
chart: (item) => L._("y: ") + d3.format("." + opts.decimalsY + "f")(item[opts.yAttr]) + " " + altitude.label,
|
|
106
|
+
marker: (item) => d3.format("." + opts.decimalsY + "f")(item[opts.yAttr]) + " " + altitude.label,
|
|
114
107
|
});
|
|
115
108
|
|
|
116
109
|
this._registerSummary({
|
|
117
110
|
"maxele" : {
|
|
118
111
|
label: "Max Elevation: ",
|
|
119
|
-
value: (track) => (track.elevation_max || 0).toFixed(2) + ' ' +
|
|
112
|
+
value: (track) => (track.elevation_max || 0).toFixed(2) + ' ' + altitude.label
|
|
120
113
|
},
|
|
121
114
|
"minele" : {
|
|
122
115
|
label: "Min Elevation: ",
|
|
123
|
-
value: (track) => (track.elevation_min || 0).toFixed(2) + ' ' +
|
|
116
|
+
value: (track) => (track.elevation_min || 0).toFixed(2) + ' ' + altitude.label
|
|
124
117
|
},
|
|
125
118
|
});
|
|
126
119
|
|
package/src/chart.js
CHANGED
|
@@ -14,13 +14,13 @@ export var Chart = L.Class.extend({
|
|
|
14
14
|
|
|
15
15
|
// cache registered components
|
|
16
16
|
this._props = {
|
|
17
|
-
scales
|
|
18
|
-
paths
|
|
19
|
-
areas
|
|
20
|
-
grids
|
|
21
|
-
axes
|
|
22
|
-
legendItems: {},
|
|
23
|
-
|
|
17
|
+
scales : {},
|
|
18
|
+
paths : {},
|
|
19
|
+
areas : {},
|
|
20
|
+
grids : {},
|
|
21
|
+
axes : {},
|
|
22
|
+
legendItems : {},
|
|
23
|
+
tooltipItems: {},
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
this._scales = {};
|
|
@@ -31,14 +31,6 @@ export var Chart = L.Class.extend({
|
|
|
31
31
|
this._brushEnabled = opts.dragging;
|
|
32
32
|
this._zoomEnabled = opts.zooming;
|
|
33
33
|
|
|
34
|
-
if (opts.imperial) {
|
|
35
|
-
this._xLabel = "mi";
|
|
36
|
-
this._yLabel = "ft";
|
|
37
|
-
} else {
|
|
38
|
-
this._xLabel = opts.xLabel;
|
|
39
|
-
this._yLabel = opts.yLabel;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
34
|
let chart = this._chart = D3.Chart(opts);
|
|
43
35
|
|
|
44
36
|
// SVG Container
|
|
@@ -50,22 +42,17 @@ export var Chart = L.Class.extend({
|
|
|
50
42
|
this._point = chart.pane('point');
|
|
51
43
|
this._axis = chart.pane('axis');
|
|
52
44
|
this._legend = chart.pane('legend');
|
|
45
|
+
this._tooltip = chart.pane('tooltip');
|
|
46
|
+
this._ruler = chart.pane('ruler');
|
|
53
47
|
|
|
54
48
|
// Scales
|
|
55
49
|
this._initScale();
|
|
56
50
|
|
|
57
51
|
// Helpers
|
|
58
52
|
this._clipPath = chart.get('clipPath');
|
|
59
|
-
this._canvas = chart.get('canvas');
|
|
60
53
|
this._context = chart.get('context');
|
|
61
|
-
this._dragG = chart.get('dragG');
|
|
62
|
-
this._focusG = chart.get('focusG');
|
|
63
54
|
this._brush = chart.get('brush');
|
|
64
55
|
|
|
65
|
-
// Tooltip
|
|
66
|
-
this._focusline = this._focusG.select('.mouse-focus-line');
|
|
67
|
-
this._focuslabel = this._focusG.select('.mouse-focus-label');
|
|
68
|
-
|
|
69
56
|
this._zoom = d3.zoom();
|
|
70
57
|
this._drag = d3.drag();
|
|
71
58
|
|
|
@@ -101,62 +88,33 @@ export var Chart = L.Class.extend({
|
|
|
101
88
|
this._area.selectAll('path').attr("d", "M0 0");
|
|
102
89
|
this._context.clearRect(0, 0, this._width(), this._height());
|
|
103
90
|
|
|
104
|
-
if (this._path) {
|
|
91
|
+
// if (this._path) {
|
|
105
92
|
// this._x.domain([0, 1]);
|
|
106
93
|
// this._y.domain([0, 1]);
|
|
107
|
-
}
|
|
94
|
+
// }
|
|
108
95
|
},
|
|
109
96
|
|
|
110
97
|
_drawPath: function(name) {
|
|
111
|
-
let opts = this.options;
|
|
112
|
-
let ctx = this._context;
|
|
113
|
-
|
|
114
98
|
let path = this._paths[name];
|
|
115
99
|
let area = this._props.areas[name];
|
|
116
|
-
let node = path.node();
|
|
117
|
-
let scaleX = this._scales[area.scaleX];
|
|
118
|
-
let scaleY = this._scales[area.scaleY];
|
|
119
|
-
|
|
120
|
-
area = L.extend({}, area, {
|
|
121
|
-
width : this._width(),
|
|
122
|
-
height : this._height(),
|
|
123
|
-
scaleX : scaleX,
|
|
124
|
-
scaleY : scaleY
|
|
125
|
-
});
|
|
126
100
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
101
|
+
path.datum(this._data).attr("d",
|
|
102
|
+
D3.Area(
|
|
103
|
+
L.extend({}, area, {
|
|
104
|
+
width : this._width(),
|
|
105
|
+
height : this._height(),
|
|
106
|
+
scaleX : this._scales[area.scaleX],
|
|
107
|
+
scaleY : this._scales[area.scaleY]
|
|
108
|
+
})
|
|
109
|
+
)
|
|
110
|
+
);
|
|
132
111
|
|
|
133
112
|
if (path.classed('leaflet-hidden')) return;
|
|
134
113
|
|
|
135
|
-
if (
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
ctx.beginPath();
|
|
139
|
-
ctx.moveTo(0, 0);
|
|
140
|
-
let p = new Path2D(path.attr('d'));
|
|
141
|
-
|
|
142
|
-
ctx.strokeStyle = path.attr('stroke');
|
|
143
|
-
ctx.fillStyle = path.attr('fill');
|
|
144
|
-
ctx.lineWidth = 1.25;
|
|
145
|
-
ctx.globalCompositeOperation = 'source-over';
|
|
146
|
-
|
|
147
|
-
// stroke opacity
|
|
148
|
-
ctx.globalAlpha = path.attr('stroke-opacity') || 0.3;
|
|
149
|
-
ctx.stroke(p);
|
|
150
|
-
|
|
151
|
-
// fill opacity
|
|
152
|
-
ctx.globalAlpha = path.attr('fill-opacity') || 0.45;
|
|
153
|
-
ctx.fill(p);
|
|
154
|
-
|
|
155
|
-
ctx.globalAlpha = 1;
|
|
156
|
-
|
|
157
|
-
ctx.closePath();
|
|
114
|
+
if (this.options.preferCanvas) {
|
|
115
|
+
_.drawCanvas(this._context, path);
|
|
158
116
|
} else {
|
|
159
|
-
this._area.append(() => node);
|
|
117
|
+
this._area.append(() => path.node());
|
|
160
118
|
}
|
|
161
119
|
},
|
|
162
120
|
|
|
@@ -307,8 +265,8 @@ export var Chart = L.Class.extend({
|
|
|
307
265
|
|
|
308
266
|
const label = (e, d) => {
|
|
309
267
|
let yMax = this._height();
|
|
310
|
-
let y = this.
|
|
311
|
-
if (y >= yMax || y <= 0) this.
|
|
268
|
+
let y = this._ruler.data()[0].y;
|
|
269
|
+
if (y >= yMax || y <= 0) this._ruler.select(".horizontal-drag-label").text('');
|
|
312
270
|
this._hideDiagramIndicator();
|
|
313
271
|
};
|
|
314
272
|
|
|
@@ -317,15 +275,15 @@ export var Chart = L.Class.extend({
|
|
|
317
275
|
let yCoord = d3.pointers(e, this._area.node())[0][1];
|
|
318
276
|
let y = yCoord > 0 ? (yCoord < yMax ? yCoord : yMax) : 0;
|
|
319
277
|
let z = this._y.invert(y);
|
|
320
|
-
let data = L.extend(this.
|
|
278
|
+
let data = L.extend(this._ruler.data()[0], { y: y });
|
|
321
279
|
|
|
322
|
-
this.
|
|
280
|
+
this._ruler
|
|
323
281
|
.data([data])
|
|
324
282
|
.attr("transform", d => "translate(" + d.x + "," + d.y + ")")
|
|
325
283
|
.classed('active', y < yMax);
|
|
326
284
|
|
|
327
285
|
this._container.select(".horizontal-drag-label")
|
|
328
|
-
.text(formatNum(z) + " " + this.
|
|
286
|
+
.text(formatNum(z) + " " + (this.options.imperial ? 'ft' : 'm'));
|
|
329
287
|
|
|
330
288
|
this.fire('ruler_filter', { coords: yCoord < yMax && yCoord > 0 ? this._findCoordsForY(yCoord) : [] });
|
|
331
289
|
}
|
|
@@ -334,7 +292,7 @@ export var Chart = L.Class.extend({
|
|
|
334
292
|
.on("start end", label)
|
|
335
293
|
.on("drag", position);
|
|
336
294
|
|
|
337
|
-
this.
|
|
295
|
+
this._ruler.call(drag);
|
|
338
296
|
|
|
339
297
|
},
|
|
340
298
|
|
|
@@ -427,7 +385,7 @@ export var Chart = L.Class.extend({
|
|
|
427
385
|
},
|
|
428
386
|
|
|
429
387
|
/**
|
|
430
|
-
* Add a
|
|
388
|
+
* Add a point of interest over the chart
|
|
431
389
|
*/
|
|
432
390
|
_registerCheckPoint: function(point) {
|
|
433
391
|
if (!this._data.length) return;
|
|
@@ -442,58 +400,19 @@ export var Chart = L.Class.extend({
|
|
|
442
400
|
x = this._x(point.dist);
|
|
443
401
|
item = this._data[this._findIndexForXCoord(x)]
|
|
444
402
|
y = this._y(item.z);
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
point.item.append("svg:line")
|
|
455
|
-
.attr("y1", 0)
|
|
456
|
-
.attr("x1", 0)
|
|
457
|
-
.attr("style","stroke: rgb(51, 51, 51); stroke-width: 0.5; stroke-dasharray: 2, 2;");
|
|
458
|
-
|
|
459
|
-
point.item
|
|
460
|
-
.append("svg:circle")
|
|
461
|
-
.attr("class", " height-focus circle-lower")
|
|
462
|
-
.attr("r", 3);
|
|
463
|
-
|
|
464
|
-
if (point.label) {
|
|
465
|
-
point.item.append("svg:text")
|
|
466
|
-
.attr("dx", "4px")
|
|
467
|
-
.attr("dy", "-4px");
|
|
468
|
-
}
|
|
469
|
-
}
|
|
470
|
-
|
|
471
|
-
point.item
|
|
472
|
-
.datum({
|
|
473
|
-
pos: point.position,
|
|
474
|
-
x: x,
|
|
475
|
-
y: y
|
|
476
|
-
})
|
|
477
|
-
.attr("class", d => "point " + d.pos)
|
|
478
|
-
.attr("transform", d => "translate(" + d.x + "," + d.y + ")");
|
|
479
|
-
|
|
480
|
-
point.item.select('line')
|
|
481
|
-
.datum({
|
|
482
|
-
y2: ({'top': -y, 'bottom': this._height() - y})[point.position],
|
|
483
|
-
x2: ({'left': -x, 'right': this._width() - x})[point.position] || 0
|
|
484
|
-
})
|
|
485
|
-
.attr("y2", d => d.y2)
|
|
486
|
-
.attr("x2", d => d.x2)
|
|
487
|
-
|
|
488
|
-
if (point.label) {
|
|
489
|
-
point.item.select('text')
|
|
490
|
-
.text(point.label);
|
|
491
|
-
}
|
|
492
|
-
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
this._point.call(D3.CheckPoint({
|
|
406
|
+
point: point,
|
|
407
|
+
width: this._width(),
|
|
408
|
+
height: this._height(),
|
|
409
|
+
x: x,
|
|
410
|
+
y: y,
|
|
411
|
+
}));
|
|
493
412
|
},
|
|
494
413
|
|
|
495
|
-
|
|
496
|
-
this._props.
|
|
414
|
+
_registerTooltip: function(props) {
|
|
415
|
+
this._props.tooltipItems[props.name] = props;
|
|
497
416
|
},
|
|
498
417
|
|
|
499
418
|
_updateArea: function() {
|
|
@@ -582,7 +501,7 @@ export var Chart = L.Class.extend({
|
|
|
582
501
|
|
|
583
502
|
_updateLegend: function () {
|
|
584
503
|
|
|
585
|
-
if (this.options.legend
|
|
504
|
+
if (this.options.legend === false) return;
|
|
586
505
|
|
|
587
506
|
let legends = this._props.legendItems;
|
|
588
507
|
let legend;
|
|
@@ -664,16 +583,10 @@ export var Chart = L.Class.extend({
|
|
|
664
583
|
_updateScale: function() {
|
|
665
584
|
if (this.zooming) return { x: this._x, y: this._y };
|
|
666
585
|
|
|
667
|
-
let
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
let r = this._ranges;
|
|
672
|
-
|
|
673
|
-
for (let i in scales) {
|
|
674
|
-
scales[i]
|
|
675
|
-
.domain(d[i](this._data))
|
|
676
|
-
.range(r[i](this._width(), this._height()))
|
|
586
|
+
for (let i in this._scales) {
|
|
587
|
+
this._scales[i]
|
|
588
|
+
.domain(this._domains[i](this._data))
|
|
589
|
+
.range(this._ranges[i](this._width(), this._height()))
|
|
677
590
|
}
|
|
678
591
|
|
|
679
592
|
return { x: this._x, y: this._y };
|
|
@@ -772,31 +685,19 @@ export var Chart = L.Class.extend({
|
|
|
772
685
|
* Display distance and altitude level ("focus-rect").
|
|
773
686
|
*/
|
|
774
687
|
_showDiagramIndicator: function(item, xCoordinate) {
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
this._focusG.attr("display", null);
|
|
779
|
-
|
|
780
|
-
this._focusline.call(
|
|
781
|
-
D3.MouseFocusLine({
|
|
688
|
+
this._tooltip
|
|
689
|
+
.attr("display", null)
|
|
690
|
+
.call(D3.Tooltip({
|
|
782
691
|
xCoord: xCoordinate,
|
|
783
|
-
|
|
784
|
-
})
|
|
785
|
-
);
|
|
786
|
-
|
|
787
|
-
this._focuslabel.call(
|
|
788
|
-
D3.MouseFocusLabel({
|
|
789
|
-
xCoord: xCoordinate,
|
|
790
|
-
yCoord: yCoordinate,
|
|
692
|
+
yCoord: this._y(item[this.options.yAttr]),
|
|
791
693
|
height: this._height(),
|
|
792
694
|
width : this._width(),
|
|
793
|
-
labels: this._props.
|
|
695
|
+
labels: this._props.tooltipItems,
|
|
794
696
|
item: item
|
|
795
|
-
})
|
|
796
|
-
);
|
|
697
|
+
}));
|
|
797
698
|
},
|
|
798
699
|
|
|
799
700
|
_hideDiagramIndicator: function() {
|
|
800
|
-
this.
|
|
701
|
+
this._tooltip.attr("display", 'none');
|
|
801
702
|
},
|
|
802
703
|
});
|