equal
deleted
inserted
replaced
102 return dumps(plot) |
102 return dumps(plot) |
103 |
103 |
104 def _render(self, req, width=500, height=400): |
104 def _render(self, req, width=500, height=400): |
105 # XXX IE requires excanvas.js |
105 # XXX IE requires excanvas.js |
106 req.add_js( ('jquery.flot.js', 'cubicweb.flot.js', 'excanvas.js') ) |
106 req.add_js( ('jquery.flot.js', 'cubicweb.flot.js', 'excanvas.js') ) |
107 figid = u'figure%s' % make_uid('foo') |
107 figid = u'figure%s' % req.varmaker.next() |
108 plotdefs = [] |
108 plotdefs = [] |
109 plotdata = [] |
109 plotdata = [] |
110 self.w(u'<div id="%s" style="width: %spx; height: %spx;"></div>' % |
110 self.w(u'<div id="%s" style="width: %spx; height: %spx;"></div>' % |
111 (figid, width, height)) |
111 (figid, width, height)) |
112 for idx, (label, plot) in enumerate(zip(self.labels, self.plots)): |
112 for idx, (label, plot) in enumerate(zip(self.labels, self.plots)): |