Is it possible to have the linear gauge pointer start from the center?

1. Nicklas
45 posts
Member since:
Oct 2012

Posted 22 Jul 2013 Link to this post

Hi,

I have a case where I measure negative and positive speed using the same linear gauge. I was wondering if it's possible to have the pointer start with the center as a zero-point? Here's my code:
`<script>`
`    ``function` `createSpeedGauge() {`
`        ``\$(``"#speedBar"``).kendoLinearGauge({`
`            ``pointer: {`
`                ``value: 0,`
`                ``color: ``"black"``,`
`                ``start: 0`
`            ``},`
`            ``scale: {`
`                ``majorUnit: 20,`
`                ``minorUnit: 2,`
`                ``min: -120,`
`                ``max: 120,`
`                ``vertical: ``true``,`
`                ``reverse: ``true``,`
`                ``ranges: [`
`                    ``{`
`                        ``from: -120,`
`                        ``to: -30,`
`                        ``color: ``"#ffc700"`
`                    ``},`
`                    ``{`
`                        ``from: 120,`
`                        ``to: 30,`
`                        ``color: ``"#ffc700"`
`                    ``}`
`                ``]`
`            ``}`
`        ``});`
`    ``}`

`    ``\$(document).ready(``function``() {`
`        ``createSpeedGauge();`
`    ``});`
`</script>`
I've attached an image of how it's setup (the gauge in question on the right side). If this was setup the way I wanted, this gauge would've read -120 from this picture.  Hopefully, I've expressed myself clearly :)
2. Iliana Nikolova
2615 posts

Posted 23 Jul 2013 Link to this post

Hello Nicklas,

If I understand your scenario correctly you would like the pointer to start from 0 and go to -120? If this is the case I am afraid it is not supported and there is no a suitable workaround I can suggest you. If you are requesting different functionality please elaborate a bit more on the exact outcome you are expecting. Thank you in advance for your cooperation.

Regards,
Iliana Nikolova
Telerik
3. Nicklas
45 posts
Member since:
Oct 2012

Posted 24 Jul 2013 Link to this post

Hi Iliana,

Yes, you've understood me correctly. I'd like to move the filler either in a negative or positive direction, starting from the center and not one of the outer edges.
I know someone has done this with the telerik linear bars, but this might require a different approach using javascript?