Jump to content
UBot Underground

Load Variable Into "load Html"


Recommended Posts

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 work

Please 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

Link to post
Share on other sites

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

post-223-0-28431000-1508994202_thumb.jpg     post-223-0-32627200-1508994227_thumb.jpg

  • Like 2
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...