equal
deleted
inserted
replaced
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') |