Marton 48 Posted October 26, 2017 Report Share Posted October 26, 2017 I remember being able to do this in a previous version of Ubot. How can I add a variable (or $read file) into load html command? {#myvariable} did not workPlease see uploaded file which should display a graph. 2 line charts should appear, but the one with #myvariable is not read into the graph.Please advise (this should be useful not only for graphs, this is an example).Thanks,Marton set(#myvariable,"1053|1057|1084|1082|1098|1055|1068|1067","Global") load html("<html> <head> <title>My first chart using FusionCharts Suite XT</title> <script type=\"text/javascript\" src=\"http://static.fusioncharts.com/code/latest/fusioncharts.js\"></script> <script type=\"text/javascript\" src=\"http://static.fusioncharts.com/code/latest/themes/fusioncharts.theme.fint.js?cacheBust=56\"></script> <script type=\"text/javascript\"> FusionCharts.ready(function()\{ var fusioncharts = new FusionCharts(\{ type: \'zoomline\', renderAt: \'chart-container\', width: \'600\', height: \'400\', dataFormat: \'json\', dataSource: \{ \"chart\": \{ \"caption\": \"Unique Website Visitors\", \"subcaption\": \"Last year\", \"yaxisname\": \"Unique Visitors\", \"xaxisname\": \"Date\", \"yaxisminValue\": \"800\", \"yaxismaxValue\": \"1400\", \"pixelsPerPoint\": \"0\", \"pixelsPerLabel\": \"30\", \"lineThickness\": \"1\", \"compactdatamode\": \"1\", \"dataseparator\": \"|\", \"labelHeight\": \"30\", \"theme\": \"fint\" \}, \"categories\": [\{ \"category\": \"Jan 01|Jan 02|Jan 03|Jan 04|Jan 05|Jan 06|Jan 07|Jan 08\" \}], \"dataset\": [\{ \"seriesname\": \"harrysfoodmart.com\", \"data\": \"978|976|955|981|992|964|973|949\" \}, \{ \"seriesname\": \"harrysfashion.com\", \"data\": \"\{#myvariable\}\" \}] \} \} ); fusioncharts.render(); \}); </script> </head> <body> <div id=\"chart-container\">FusionCharts XT will load here!</div> </body> </html>") graph.ubot Quote Link to post Share on other sites
darryl561 177 Posted October 26, 2017 Report Share Posted October 26, 2017 Hi Marton, in code view remove the 2 backslashes from this part of your code: \{#myvariable\}so that in node view it looks like the second image. first second 2 Quote Link to post Share on other sites
Marton 48 Posted October 26, 2017 Author Report Share Posted October 26, 2017 Yes!! Thank you Darryl, you're still the best, I hope you are well! Kindest Regards,Marton Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.