When I load my web page to generate an RGraph scatter plot chart I get the following popup instead:
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>
