0

When I load my web page to generate an RGraph scatter plot chart I get the following popup instead: localhost says popup

Once I click [OK] it loads the chart. I get the same popup when trying to load an RGraph line chart. How do I prevent this popup?

= = = = = = = = = = = = = = = = = = = = =

I figured it out Richard and WhiteHat! - Using code you originally sent me Richard I included the line '$p(data);'. When I commented out that line the popup went away. Here is the code that works:

<script>
    var url = "https://[LOCALHOST DATA SOURCE]";
    //var url = "getdata.json";
    RGraph.SVG.AJAX.getJSON(url, function (json)
    {
      var data = [];

      for (var i=0; i<json.Items.length; i++) {
          data.push({
              x: json.Items[i].Timestamp.replace(/Z$/,''), // Remove the Z from the timestamp
              y: json.Items[i].Value
          });
      }

      //$p(data);

      new RGraph.SVG.Scatter({
          id: 'chart-container',
          data: data,
          options: {
              backgroundGridVlines: false,
              backgroundGridBorder: false,
              yaxis: false,
              colors: ['red'],
              xaxisScaleMin: '26-July-2019 00:00:00',
              xaxisScaleMax: '26-July-2019 12:00:00'
          }
      }).draw();
    });
   
</script>
enter image description here
WebFixItMan
  • 231
  • 2
  • 9
  • Have you modified the RGraph library at all? And can you post the code that you're using so that I can try and replicate it. – Richard Jul 26 '19 at 10:17
  • somewhere in the javascript, `alert` is being used to display the data... – WhiteHat Jul 26 '19 at 11:16

0 Answers0