Jump to content
UBot Underground

Scrape Data and Graph it on Load HTML?


Recommended Posts

Hello guys..

I am wondering if I can grab data on a table, and then process it maybe with the PHP Plugin from TJ to graph it on a Load HTML event dropping many statistics about that.

How can I query data on Table inside a load HTML?

Hope we can have a discussion together so we can learn how to play with data like that.

I think is going to be the future of Ubot.

Link to post
Share on other sites

You might be better off doing it inside of the ui html panel. That way you don't need to have a browser at all and the ui html panel will update automatically instead of having to refresh the load html. You can get all your HTML into a variable and have it display via <span variable="#html" fillwith="innerhtml"></span> or change span to div or whatever else you want to use.

Link to post
Share on other sites

load html("<html>
  <head>
    <script type=\"text/javascript\" src=\"https://www.google.com/jsapi\"></script>
    <script type=\"text/javascript\">
      google.load(\"visualization\", \"1\", \{packages:[\"corechart\"]\});
      google.setOnLoadCallback(drawChart);
      function drawChart() \{
        var data = google.visualization.arrayToDataTable([
          [\'Year\', \'Sales\', \'Expenses\],
          [\'2004\',  1000,      400],
          [\'2005\',  1170,      460],
          [\'2006\',  660,       1120],
          [\'2007\',  1030,      540]
        ]);

        var options = \{
          title: \'Company Performance\'
        \};

        var chart = new google.visualization.LineChart(document.getElementById(\'chart_div\'));
        chart.draw(data, options);
      \}
    </script>
  </head>
  <body>
    <div id=\"chart_div\" style=\"width: 900px; height: 500px;\"></div>
  </body>
</html>")

 

 

This from

 

https://developers.google.com/chart/interactive/docs/gallery/linechart

 

https://developers.google.com/chart/    main page

 

 

Have fun!!!

  • Like 1
Link to post
Share on other sites
  • 1 month later...

Hi,

 

 

Can I use a table to graph it with this API?

 

Yes. You can.

Provided you format the table data in API format.

Ex.

          [\'Year\', \'Sales\', \'Expenses\'],
          [\'2004\',  1000,      400],
          [\'2005\',  1170,      460],
          [\'2006\',  660,       1120],
          [\'2007\',  1030,      540]

Kevin

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...