thingsboard Markers settings

Markers settings 

Label function

  • Set additional rotation angle for marker

  • Widget label, or specify label function (you may change data contained in a widget label based on data, dsData, dsIndex)

Label function:

 
1
2
3
4
5
6
7
8
var speed = data['speed'];
var res;
if (speed > 55) {
    res = "Too Fast"
} else {
    res = "Everything is OK"
}
return res;

Copy to clipboard

Marker function:

In addition to all of this, there are some settings for the marker and you can specify next settings for it:

  • Custom marker image

  • Custom marker image size px

  • Marker image function (you may change marker image, marker image color based on data, dsData, dsIndex)

  • Specify other possible marker images, which can be used in a marker image function

Marker image function:

 
1
2
3
4
5
6
7
8
9
10
11
var speed = data['speed'];
var res = {
    url: images[0],
    size: 40
}
if (speed < 55) {
    res.url = images[0];
} else {
    res.url = images[1];
}
return res;

Copy to clipboard

Path Settings

You can specify path color or specify path color function (you may change data based on data, dsData, dsIndex) - the color of the marker moves

Path color function:

 
1
2
3
4
5
6
7
8
var speed = data['speed'];
var res;
if (speed > 55) {
    res = "red"
} else {
    res = "green"
}
return res;

Copy to clipboard

Path decorator

  • Path decorator, its size in px, end/beginning offset, decorator repeater, stroke weight and stroke opacity

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值