web/views/plots.py
branchstable
changeset 4721 8f63691ccb7f
parent 4719 aaed3f813ef8
child 5041 ebdab53b0c45
equal deleted inserted replaced
4720:ddf4f19eb07a 4721:8f63691ccb7f
    92     def dump_plot(self, plot):
    92     def dump_plot(self, plot):
    93         # XXX for now, the only way that we have to customize properly
    93         # XXX for now, the only way that we have to customize properly
    94         #     datetime labels on tooltips is to insert an additional column
    94         #     datetime labels on tooltips is to insert an additional column
    95         #     cf. function onPlotHover in cubicweb.flot.js
    95         #     cf. function onPlotHover in cubicweb.flot.js
    96         if self.timemode:
    96         if self.timemode:
    97             plot = [(datetime2ticks(x), y, datetime2ticks(x)) for x,y in plot]
    97             plot = [(datetime2ticks(x), y, datetime2ticks(x)) for x, y in plot]
    98         return dumps(plot)
    98         return dumps(plot)
    99 
    99 
   100     def _render(self, req, width=500, height=400):
   100     def _render(self, req, width=500, height=400):
   101         if req.ie_browser():
   101         if req.ie_browser():
   102             req.add_js('excanvas.js')
   102             req.add_js('excanvas.js')