+ data: [
+ <% my ($d, $w);
+ $s = "";
+ $d = 0; $w = 0;
+ for (@main::last10minsr) {
+ my $r = $main::json->decode($_);
+ if ($r) {
+ $r->{r}->{Dir} ||= $d;
+ $r->{r}->{Wind} ||= $w;
+ $s .= "[" . $r->{r}->{Dir} . "," . main::nearest(0.1, $r->{r}->{Wind}*2.23694) . "],";
+ $d = $r->{r}->{Dir};
+ $w = $r->{r}->{Wind};
+ }
+ }
+ chop $s if length $s;
+ %><%= $s %>
+ ]