web/views/plots.py
changeset 10669 155c29e0ed1c
parent 10666 7f6b5f023884
child 10688 fa29f3628a1b
equal deleted inserted replaced
10668:4fb62d791073 10669:155c29e0ed1c
   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)):