def charts(self): # only get data if we're loading an actual report - this requires filters if 'location_id' in self.request.GET: chart = MultiBarChart(None, Axis(_('Products')), Axis(_('% of Facilities'), ',.1d')) chart.data = self.get_data_for_graph() return [chart]
def charts(self): if 'location_id' in self.request.GET: # hack: only get data if we're loading an actual report chart = MultiBarChart(None, Axis(_('Products')), Axis(_('% of Facilities'), ',.1d')) chart.data = self.get_data_for_graph() return [chart]
def charts(self): chart = MultiBarChart(None, Axis(''), Axis('')) chart.height = 400 chart.marginBottom = 100 chart.data = self.get_data_for_graph() return [chart]