Hi Katya,
I've tried to retrace the directions you so graciously provided me for the jplot graphs, and I'm not sure what I have wrong.
When I press the "view ride data" button, I don't navigate to the "results" page now. It looks like an "unexpected token var" in the logcat of Eclipse. The javascript I have on page show on "results" page is:
code
var coordsArray = localStorage.getItem("coordsArray");
var startTime = coordsArray[0].time;
var points = [];
for (var i=0; i<coordsArray.length; i++){
points.push([(coordsArray.time - startTime) / 1000, coordsArray.speed]);
}
var plot = $.jqplot('plot1', [points], {
series:[{showMarker:false}],
axes:{
xaxis:{
label:'Journey time (sec)',
labelRenderer: $.jqplot.CanvasAxisLabelRenderer
},
yaxis:{
label:'Speed (m/h)',
labelRenderer: $.jqplot.CanvasAxisLabelRenderer
var plot = $.jqplot('plot2', [points], {
series:[{showMarker:false}],
axes:{
xaxis:{
label:'Journey Time (minutes)',
labelRender: $.jqplot.CanvasAxisLabelRenderer},
yaxis:{
label:'Altitude (feet)',
labelRenderer: $jqplot.CanvasAxisLabelRenderer}
}
})
}
}
});/code
JSLint produces this feedback:
Do I need to define localStorage and/or put a value in the "var points = []" between the brackets?
And the panels on the page have the html code for "plot 1" and "plot 2."
Thank you so much for your help!