equal
deleted
inserted
replaced
117 |
117 |
118 def _render(self, req, width=500, height=400): |
118 def _render(self, req, width=500, height=400): |
119 if req.ie_browser(): |
119 if req.ie_browser(): |
120 req.add_js('excanvas.js') |
120 req.add_js('excanvas.js') |
121 req.add_js(('jquery.flot.js', 'cubicweb.flot.js')) |
121 req.add_js(('jquery.flot.js', 'cubicweb.flot.js')) |
122 figid = u'figure%s' % req.varmaker.next() |
122 figid = u'figure%s' % next(req.varmaker) |
123 plotdefs = [] |
123 plotdefs = [] |
124 plotdata = [] |
124 plotdata = [] |
125 self.w(u'<div id="%s" style="width: %spx; height: %spx;"></div>' % |
125 self.w(u'<div id="%s" style="width: %spx; height: %spx;"></div>' % |
126 (figid, width, height)) |
126 (figid, width, height)) |
127 for idx, (label, plot) in enumerate(zip(self.labels, self.plots)): |
127 for idx, (label, plot) in enumerate(zip(self.labels, self.plots)): |