This is a migrated thread and some comments may be shown as answers.

[Solved] Manipulating Individual Ticks

1 Answer 56 Views
Gauge for HTML
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brendan
Top achievements
Rank 1
Brendan asked on 20 Feb 2013, 04:54 PM
Hello, 

I'm wondering if the gauges for HTML support the manipulation of individual ticks on the gauge. For example, if i wanted to have a range from 90 to 100 but only wanted ticks at 90, 100, 92, and 96 without any other ticks. Is this possible?

Thanks

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 21 Feb 2013, 10:09 AM
Hi Brendan,

Instead of ticks visibility, you can provide conditional labels visibility (all ticks are together either visible, or not visible). This can be achieved using a template for the label. In it, we check whether the current value is among the wanted ones and if so, show it:
<div data-win-control="Telerik.UI.RadRadialGauge" data-win-options="{
    min: 90,
    max: 100,
    majorUnit: 2,
    value: 95,
    labels: {
        template: '#=[90,92,96,100].indexOf(value)!=-1 ? value: ""#'
    },
    majorTicks: {
        visible: false
    },
    minorTicks: {
        visible: false
    }
}">
</div>

I hope this helps.

Kind regards,
Tsvetina
the Telerik team
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
Gauge for HTML
Asked by
Brendan
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or