当我加载网页以生成 RGraph 散点图时,我得到以下弹出窗口:
单击 [确定] 后,它会加载图表。尝试加载 RGraph 折线图时出现相同的弹出窗口。如何防止此弹出窗口?
= = = = = = = = = = = = = = = = = = = =
我想通了理查德和白帽!- 使用你最初发给我的代码,Richard 我包含了“$p(data);”这一行。当我注释掉该行时,弹出窗口消失了。这是有效的代码:
<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>
