When I first test this I get the uncaught exception error. If I refresh it goes away and the graph loads great. How do I go about fixing this?
var L1 = JSON.parse(sessionStorage.getItem("daily_pts"));
var x1 = JSON.parse(sessionStorage.getItem("daily_goal"));
var line1 = [];
var ticks = [];
for (var i=0; i < 7; i++ )
{
line1.push(L1); // console says there error is on this line
ticks.push(x1);
}
$.jqplot('myplot', [line1],
{
seriesDefaults:{
renderer:$.jqplot.BarRenderer,
rendererOptions: {fillToZero: false}
},
title:'Daily Points',
axes:{
xaxis:{
renderer: $.jqplot.CategoryAxisRenderer,
ticks: ticks
},
yaxis:{min:0, max:100}}
});