I'm using Play Framework and I want to reproduce the plots that I have in an HTML file with the data I pass from the controller to this HTML file, but this reproduction has to be in the index page. That's to say, I pass the data from a simulation to the HTML page and there I plot the charts, and I'd like to get this data plotted properly in this HTML file let's call it "File 2" to the index HTML, let's call it "page 1".
I would like to be able to obtain this data plotted (the "arrays", let's say) from file 2 to the file 1 so I would just need to type:
$.plot(...)
and avoid creating the arrays of data again (perhaps I can link the file2 with something like @file2.html.data1
, #{extends 'file2.html' /}
or something similar). How can I get the data from the HTML where I plot it and pass it from an this HTML file to the index HTML page? Thanks!
(If if helps, I have all the plots stored in variables (myPlot = $.plot($("#placeholder"), data, options);, myPlot2 = $.plot($("#placeholder2"), data, options)
;, ... in the file where I initially plot them).