This is a migrated thread and some comments may be shown as answers.
Is it possible to have the linear gauge pointer start from the center?
3 Answers 21 Views
Top achievements
Rank 1
Nicklas asked on 22 Jul 2013, 07:47 AM
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 :)

## 3 Answers, 1 is accepted

0
Iliana Nikolova
Telerik team
answered on 23 Jul 2013, 02:54 PM
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
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Nicklas
Top achievements
Rank 1
answered on 24 Jul 2013, 06:55 AM
Hi Iliana,

Thanks for your reply!

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?

0
Iliana Nikolova
Telerik team
answered on 25 Jul 2013, 12:35 PM
Hi Nicklas,

As I mentioned in my previous post, this functionality is not available in Kendo UI LinearGauge and there is no a suitable workaround I can suggest you. If you wish you may send this idea as a feature request at our UserVoice portal - this way the community would be able to evaluate it and if the suggestion gains popularity we will consider its implementation for future releases.

Regards,
Iliana Nikolova
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Asked by
Nicklas
Top achievements
Rank 1
Answers by
Iliana Nikolova
Telerik team
Nicklas
Top achievements
Rank 1
Share this question
or