onenetview3.0的使用
1.柱状图api数据过滤器//doSomethingvar result = [];data.forEach(function (point) { result.push( { x: point.data.datastreams.id, y1: point.data.datastreams.datapoints.value, }, { x: point.data.datastreams.id, y1: point.data.datastreams.datapoints.value }, { x: point.data.datastreams.id, y1: point.data.datastreams.datapoints.value }, { x: point.data.datastreams.id, y1: point.data.datastreams.datapoints.value }, { x: point.data.datastreams.id, y1: point.data.datastreams.datapoints.value } )})
return result;2.多条折线图api数据过滤器//doSomethingvar result = [];data.forEach(function (point) { for (var i = 0; i < 10; i++) { result.push( { x:point.data.datastreams.datapoints.at, id1:point.data.datastreams.id, value1: point.data.datastreams.datapoints.value, id2:point.data.datastreams.id, value2:point.data.datastreams.datapoints.value, id3:point.data.datastreams.id, value3: point.data.datastreams.datapoints.value, id4:point.data.datastreams.id, value4:point.data.datastreams.datapoints.value, id5:point.data.datastreams.id, value5:point.data.datastreams.datapoints.value } ) }})
return result;3.水球过滤器//doSomethingvar result = [];data.forEach(function (point) { result.push({ wave: .datapoints.value / 100], })})return result;4.表盘过滤器var result = [];data.forEach(function (point) { result.push({ value: point.data.datastreams.datapoints.value, name: '土壤2#' })})return result;5.项目展示https://open.iot.10086.cn/view/main/#/share2d?id=61223938fe013c00409cff306.参考文档链接:https://pan.baidu.com/s/1NqNq-r0FseEfLzgcC-htxA
提取码:wdf1
页:
[1]