js_events = "["
events.keys().sort.each() do |e_date|
e_details = events[e_date]
- js_events += "{\"d\":d("
+ js_events += "{\"sid\":"
+ js_events += e_details[0].snapshot_id.to_s
+ js_events += ",\"d\":d("
js_events += e_date.year.to_s
js_events += ","
# Need to decrease by 1 the month as the JS Date object start months at 0 (= January)
e_details.each() do |e|
js_events += "{\"n\":\""
js_events += e.name
- js_events += "\",\"ld\":\""
- js_events += l e_date, :format => :long
js_events += "\"},"
end
js_events += "]},"
.bottom(6)
.shape("triangle")
.strokeStyle("grey")
- .fillStyle(function(e) {return e.l[0].ld == snapshots[idx].d ? eventHoverColor : eventColor})
+ .fillStyle(function(e) {return e.sid == snapshots[idx].sid ? eventHoverColor : eventColor})
.add(pv.Dot)
.radius(3)
- .visible(function(e) { return e.l[0].ld == snapshots[idx].d;})
+ .visible(function(e) { return e.sid == snapshots[idx].sid;})
.left(w/2+8)
.top(24)
.shape("triangle")
- .fillStyle(function(e) {return e.l[0].ld == snapshots[idx].d ? eventHoverColor : eventColor})
+ .fillStyle(function(e) {return e.sid == snapshots[idx].sid ? eventHoverColor : eventColor})
.strokeStyle("grey")
.anchor("right")
.add(pv.Label)