Commit 86049fd6 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Update the controller metric2d.

parent 9b0a8ba0
......@@ -58,11 +58,16 @@ def metric2d():
store = report.get_store_configuration()
grid = report.get_grid_configuration()
img = graph.to_svg()
img = urllib.quote(img)
if graph.ax is not None:
img = graph.to_svg()
img = urllib.quote(img)
response.view = "plugin_event/grid_and_graph.html"
return dict(cfg_store=store, grid=grid, img=img, title=title)
response.view = "plugin_event/grid_and_graph.html"
return dict(cfg_store=store, grid=grid, img=img, title=title)
else:
response.view = "plugin_event/grid.html"
return dict(cfg_store=store, grid=grid, title=title)
elif extension == "pdf":
data = graph.to_pdf()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment