echart_new 新建图表
echart_new(entity_id u32,number i64);
输入参数
- entity_id 实体索引
- id_name 元素id
- theme 主题样式
- width 宽
- height 高
- option 图表option
- data 数据绑定
- timer 延时时间
- mode 模式
输出参数
- 无
例子
let option = `{"xAxis": {
"type": "category",
"data": [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sun"
]
},
"yAxis": {
"type": "value"
},
"grid": [
{ "left": "20%","right":"10%"}
],
"tooltip":{},
"backgroundColor": "transparent",
"series": [
{
"data": [
820,
932,
901,
934,
1290,
1330,
1302
],
"type": "bar",
"smooth": true
}
]
}`;
let data = `
{
"series": [
{
"data": [
820,
932,
901,
934,
1290,
1330,
1320
],
"map_data": []
}
]
}`;
echart_new(entity.index,"chart2","dark",480,280,option,data,2.0,"Run");作者:力博特 创建时间:2025-12-08 18:55
最后编辑:力博特 更新时间:2026-01-13 17:31
最后编辑:力博特 更新时间:2026-01-13 17:31