使用Node-RED爬虫并基于ECharts可视化某楼盘的销售情况
以下是一个简化的Node-RED流定义,用于从一个API获取数据,并通过ECharts在网页上显示结果。
[
{
"id": "node-red-start",
"type": "tab",
"label": "Start",
"disabled": false,
"info": "",
"env": []
},
{
"id": "1a9d8e1e.8c6158",
"type": "ui_group",
"name": "Estate Sales Dashboard",
"tab": "node-red-start",
"disp": true,
"width": "6",
"collapse": false,
"libs": [
"core",
"dashboard"
]
},
{
"id": "2256e46e.8c615",
"type": "ui_chart",
"name": "",
"tab": "node-red-start",
"disp": true,
"width": "6",
"height": "4",
"format": "timeseries",
"template": "{\"title\":{\"text\":\"Estate Sales\"},\"tooltip\":{\"trigger\":\"axis\"},\"legend\":{\"data\":[\"Sales\"]},\"xAxis\":{\"type\":\"category\",\"boundaryGap\":false,\"data\":[]},\"yAxis\":{\"type\":\"value\"},\"series\":[{\"name\":\"Sales\",\"type\":\"line\",\"data\":[]}]}",
"xaxis": {
"label": "Date",
"scale": "linear"
},
"yaxis": {
"label": "Sales",
"scale": "linear",
"min": 0
},
"src": "msg.payload",
"wires": []
},
{
"id": "3edc618e.8c6158",
"type": "ui_base",
"name": "",
"tab": "node-red-start",
"disp": true,
"width": "6",
"height": "6",
"theme": {
"name": "theme-light",
"lightTheme": {
"default": "#ffffff",
"darker": "#cccccc",
"text": "#000000",
"dashboard": {
"background": "#ffffff",
"grid": "#dddddd",
"canvas": "#e9e9e9",
"border": "#aaaaaa",
"text": "#000000"
}
},
"darkTheme": {
"default": "#222222",
"darker": "#555555",
"text": "#ffffff",
"dashboard": {
"background": "#222222",
"grid": "#444444",
"canvas": "#666666",
"border": "#888888",
"text": "#ffffff"
}
}
},
"wires": [
[
"2256e46
评论已关闭