I have a Linear Gauge looking like this:
Is it possible to update the ranges dynamically with a custom input number?
I'm trying to get the gauge like this: (I'm able to locate the gauge with no problems, it's just the ranges I cannot seem to locate correctly :))
Any help / suggestions would be greatly appreciated :)
function
createGauges(conveyanceId) {
$(
"#depthBar-"
+ conveyanceId).kendoLinearGauge({
pointer: {
value: 0,
shape:
"arrow"
,
color:
"transparent"
,
start: 0,
reverse:
true
},
scale: {
majorUnit: 500,
minorUnit: 100,
labels: {
visible:
false
},
min: -2000,
max: 2000,
vertical:
false
,
reverse:
false
,
ranges: [
{
from: -2000,
// LimitLo
to: -1500,
color:
"#ffc700"
},
{
from: 2000,
// LimitHi
to: 1500,
color:
"#ffc700"
}, {
from: 2000,
// LimitHiHi
to: 1800,
color:
"#c20000"
}, {
from: -5000,
to: -1800,
color:
"#c20000"
// LimitLoLo
}, {
from: 0,
to: 0,
color:
"lightblue"
}
]
}
});
I'm trying to get the gauge like this: (I'm able to locate the gauge with no problems, it's just the ranges I cannot seem to locate correctly :))
$(
'#depthBar-'
+ conveyanceId).data(
"kendoLinearGauge"
).options.scale.ranges[4].to = depthMessage;