Fix: ignore null altitudes (#19)
This commit is contained in:
parent
798d498001
commit
123b2ce967
@ -46,8 +46,10 @@ function displayChart() {
|
|||||||
data.addColumn('number', 'altitude');
|
data.addColumn('number', 'altitude');
|
||||||
var altLen = altitudes.length;
|
var altLen = altitudes.length;
|
||||||
for (var i = 0; i < altLen; i++) {
|
for (var i = 0; i < altLen; i++) {
|
||||||
|
if (altitudes[i]!=null){
|
||||||
data.addRow([(i + 1), Math.round((altitudes[i] * factor_m))]);
|
data.addRow([(i + 1), Math.round((altitudes[i] * factor_m))]);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var options = {
|
var options = {
|
||||||
title: lang['altitude'] + ' (' + unit_m + ')',
|
title: lang['altitude'] + ' (' + unit_m + ')',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user