diff -r 495862266785 -r 6b46d73823f5 web/views/plots.py --- a/web/views/plots.py Wed Sep 23 19:26:38 2009 +0200 +++ b/web/views/plots.py Wed Sep 23 19:40:19 2009 +0200 @@ -128,17 +128,17 @@ def call(self, width=500, height=400): # prepare data - rqlst = self.rset.syntax_tree() + rqlst = self.cw_rset.syntax_tree() # XXX try to make it work with unions varnames = [var.name for var in rqlst.children[0].get_selected_variables()][1:] - abscissa = [row[0] for row in self.rset] + abscissa = [row[0] for row in self.cw_rset] plots = [] - nbcols = len(self.rset.rows[0]) + nbcols = len(self.cw_rset.rows[0]) for col in xrange(1, nbcols): - data = [row[col] for row in self.rset] + data = [row[col] for row in self.cw_rset] plots.append(filterout_nulls(abscissa, data)) plotwidget = FlotPlotWidget(varnames, plots, timemode=self.timemode) - plotwidget.render(self.req, width, height, w=self.w) + plotwidget.render(self._cw, width, height, w=self.w) class TimeSeriePlotView(PlotView): @@ -176,20 +176,20 @@ __select__ = at_least_two_columns() & second_column_is_number() def _guess_vid(self, row): - etype = self.rset.description[row][0] - if self.schema.eschema(etype).is_final(): + etype = self.cw_rset.description[row][0] + if self._cw.schema.eschema(etype).is_final(): return 'final' return 'textincontext' def call(self, title=None, width=None, height=None): labels = [] values = [] - for rowidx, (_, value) in enumerate(self.rset): + for rowidx, (_, value) in enumerate(self.cw_rset): if value is not None: vid = self._guess_vid(rowidx) - label = '%s: %s' % (self.view(vid, self.rset, row=rowidx, col=0), + label = '%s: %s' % (self.view(vid, self.cw_rset, row=rowidx, col=0), value) - labels.append(label.encode(self.req.encoding)) + labels.append(label.encode(self._cw.encoding)) values.append(value) pie = PieChartWidget(labels, values, pieclass=self.pieclass, title=title)