Phantomjs calling functions with variable -
i trying put code variable , call variable phatom , phantom should generate graph eg: save code in var test="code"
call test in phantomjs , should generate graph, possible?
xaxis: { categories: ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'] }, series: [{ data: [29.9, 71.5, 106.4, 129.2, 144.0, 176.0, 135.6, 148.5, 216.4, 194.1, 95.6, 54.4] }]
or can create js file , call variable
phantomjs highcharts-convert.js -infile options1.json -outfile chart1.png -scale 2.5 -width 300 -constr chart -callback callback.js
it unclear question trying accomplish. if have
var test = { xaxis: { ... } };
and trying access variable within webpage (i.e. generate graph in actual dom) have pass variable argument page open method, i.e.:
var test = { xaxis: { ... } }; var page = require('webpage').create(); page.open(function (somevar) { ... // have access test variable via somevar ... }, test);
if not trying accomplish, please clarify question , best help.
Comments
Post a Comment