diff options
Diffstat (limited to 'wqflask/wqflask/static/new/javascript/create_manhattan_plot.coffee')
-rw-r--r-- | wqflask/wqflask/static/new/javascript/create_manhattan_plot.coffee | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/wqflask/wqflask/static/new/javascript/create_manhattan_plot.coffee b/wqflask/wqflask/static/new/javascript/create_manhattan_plot.coffee index 258d5c01..05ad5419 100644 --- a/wqflask/wqflask/static/new/javascript/create_manhattan_plot.coffee +++ b/wqflask/wqflask/static/new/javascript/create_manhattan_plot.coffee @@ -55,3 +55,24 @@ $("#export").click => form.find("#filename").val(filename)
form.submit()
+$("#export_pdf").click =>
+
+ #$('#topchart').remove()
+ #$('#chart_container').append('<div class="qtlcharts" id="topchart"></div>')
+ #create_interval_map()
+
+ #Get d3 SVG element
+ svg = $("#topchart").find("svg")[0]
+
+ #Extract SVG text string
+ svg_xml = (new XMLSerializer).serializeToString(svg)
+ console.log("svg_xml:", svg_xml)
+
+ #Set filename
+ filename = "manhattan_plot_" + js_data.this_trait
+
+ #Make a form with the SVG data
+ form = $("#exportpdfform")
+ form.find("#data").val(svg_xml)
+ form.find("#filename").val(filename)
+ form.submit()
|