Skip to content

Instantly share code, notes, and snippets.

@MarkPochert
Created November 3, 2011 22:32
Show Gist options
  • Save MarkPochert/1338116 to your computer and use it in GitHub Desktop.
Save MarkPochert/1338116 to your computer and use it in GitHub Desktop.
var item, line1, tmp, _i, _len;
line1 = [
{
data: []
}
];
tmp = [
{
data: [[Date.UTC(2010, 10, 1), 59.49], [Date.UTC(2010, 10, 4), 58.165], [Date.UTC(2010, 10, 6), 64], [Date.UTC(2010, 10, 8), 64], [Date.UTC(2010, 10, 9), 49.26]]
}
];
for (_i = 0, _len = data.length; _i < _len; _i++) {
item = data[_i];
line1.data.push([new Date(item.end_time).getTime(), parseFloat(item.avg_price)]);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment