web/views/plots.py
changeset 3369 7b88d12b4ee2
parent 3338 cd137d90f896
child 3408 c92170fca813
child 3689 deb13e88e037
equal deleted inserted replaced
3300:c7c4775a5619 3369:7b88d12b4ee2
   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)):