0002-visualization-format-axis-members-before-JSON-serial.patch
bijoe/visualization/utils.py | ||
---|---|---|
14 | 14 |
# You should have received a copy of the GNU Affero General Public License |
15 | 15 |
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 | 16 | |
17 |
from __future__ import unicode_literals |
|
18 | ||
17 | 19 |
import re |
18 | 20 |
import json |
19 | 21 |
import hashlib |
... | ... | |
299 | 301 | |
300 | 302 |
if len(self.drilldown) == 2: |
301 | 303 |
(x_axis, y_axis), grid = self.table_2d() |
302 |
cells = (([x.label, y.label], cell_value(grid[(x.id, y.id)])) for x in x_axis for y in y_axis)
|
|
304 |
cells = ((['%s' % x.label, '%s' % y.label], cell_value(grid[(x.id, y.id)])) for x in x_axis for y in y_axis)
|
|
303 | 305 |
elif len(self.drilldown) == 1: |
304 | 306 |
axis, grid = self.table_1d() |
305 |
cells = (([x.label], cell_value(grid[x.id])) for x in axis) |
|
307 |
cells = ((['%s' % x.label], cell_value(grid[x.id])) for x in axis)
|
|
306 | 308 |
else: |
307 | 309 |
raise NotImplementedError |
308 | 310 | |
309 |
- |