使用javascript在html web应用程序中实现Azure Time series Insights可视化



我在物联网集线器中连接了物联网传感器数据,我可以看到Azure时间序列洞察,在那里我可以通过DeviceId、avg和sum查询数据。我如何使它在我的HTML网站中可用,并以web套接字的形式连续显示数据。

我已经用D3和Angular设计了图表。我如何将这些数据输入应用程序。如果你有任何例子的话。

我看到它有非常有限的文件

var aggregateExpressions4 = [];
var startDate = new Date('2017-04-19T13:00:00Z');
var endDate = new Date(startDate.valueOf() + 1000*60*60*1);
aggregateExpressions4.push(new 
tsiClient.ux.AggregateExpression({predicateString: "Factory = 'Factory3'"}, 
{property: 'Temperature', type: "Double"}, ['avg', 'min', 'max'],
{ from: startDate, to: endDate, bucketSize: '2m' }, {property: 'Station', type: 'String'}, 'green', 'Factory3Temperature'));

https://learn.microsoft.com/en-us/azure/time-series-insights/tutorial-explore-js-client-lib

如果我能得到这些数据,我可以把它们推到我的D3图表上。但它试图推出自己的排行榜通过自己的条形图和饼图。

var barChart =  new 
tsiClient.ux.BarChart(document.getElementById('chart4'));
barChart.render(transformedResult, {grid: true, timestamp: '2017-04-19T13:00:00Z', legend: 'compact'}, aggregateExpressions4);

微软已经给出了这个,我已经尝试过了https://learn.microsoft.com/en-us/rest/api/time-series-insights/time-series-insights-reference-queryapi

最新更新