function pointFromGeoJSON(geo) { if(geo) { return L.latLng(geo[1], geo[0]) } } function showBatteryGraph(response) { var data = response.linestring; var batteryStateBands = []; var buckets = data.properties.map(function(d){return d.battery_state}).findRanges(); for(var i in buckets) { for(var j=0; j'+this.y+'%'; } }, turboThreshold: 0, lineWidth: 1, color: '#a8cff4', marker: { enabled: true, radius: 2, fillColor: '#7cb5ec' } }].concat(speedSeries(response)).concat(collectEventSeries(response)), }); }