Sha256: e76149cfc8800646356b916791fae2a39926d6d5aae449da175c1b271ab4025e
Contents?: true
Size: 1.1 KB
Versions: 10
Compression:
Stored size: 1.1 KB
Contents
define(["graph/line_chart3"], function (line_chart3) { var event_line_chart = line_chart3.extend({ defaults: function() { return this.deep_defaults({ }, event_line_chart .__super__.defaults.call(this)); }, base_css_class: 'oml-event-line-chart', initialize: function(opts) { event_line_chart.__super__.initialize.call(this, opts); var self = this; OHUB.bind("bridge.event_selected", function(evt) { self.event_id = evt.datum[evt.schema.eventID.index]; self.joint_id = evt.datum[evt.schema.jointID.index]; self.update(); }); }, update: function() { var eid = this.event_id; if (! eid) return; var data; if ((data = this.data_source.rows()) == null) { throw "Missing events array in data source"; } var ei = this.schema.eventID.index; data = _.filter(data, function(r) { return r[ei] == eid; }); if (data.length == 0) return; this.redraw(data); var i = 0; }, }); // end of event-line_chart return event_line_chart; }); // end of provide
Version data entries
10 entries across 10 versions & 1 rubygems