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

Simple horizontal LinearScale

3 Answers 57 Views
Gauges
This is a migrated thread and some comments may be shown as answers.
Bill Sivill
Top achievements
Rank 1
Bill Sivill asked on 02 Jun 2010, 01:43 AM

Greetings,  I am attempting to use the LinearScale to show a simple horizontal gauge with a Custom TickList that I am attempting to databind the ItemsSource to a POCO.  I do not want any other tick marks to show on the gauge. Is this possible?  I keep getting an error about the ticks collection not being empty.

        <telerik:RadGauge Height="50" HorizontalAlignment="Left" Margin="10,20,0,0" Name="radGauge1" VerticalAlignment="Top" Width="300">  
            <telerik:LinearScale Name="linearScale" Orientation="Horizontal" Width="300" Height="40" Left="0.02" Top="0.06" MajorTicks="0" 
                                     Min="0" Max="{Binding Resident.ResidentType.CareLevels, Converter={StaticResource CareLevelToMaxRangeConverter}}"   
                                     StartWidth="0.02" EndWidth="0.02" StrokeThickness="0.5">  
                <telerik:TickList ItemsSource="{Binding Resident.ResidentType.CareLevels, Converter={StaticResource CareLevelToTicksConverter}}">  
                </telerik:TickList> 
                <telerik:RangeList ItemsSource="{Binding Resident.ResidentType.CareLevels, Converter={StaticResource CareLevelToRangeConverter}}"/>  
                <telerik:IndicatorList> 
                    <telerik:LinearBar Width="10" Name="linearBar" TooltipFormat="Daily Minutes: {0:F1}" 
                                        Value="50" 
                                        Location="CenterInside" SnapType="None"/>  
                </telerik:IndicatorList> 
            </telerik:LinearScale> 
 
        </telerik:RadGauge> 

3 Answers, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 02 Jun 2010, 07:25 AM
Hi Bill,

We're sorry, because of a specific of TickList functionality it doesn't support databinding. Please, accept our apologies for the inconvenience caused.

All the best,
Andrey Murzov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
kilhoffer
Top achievements
Rank 1
answered on 09 Aug 2010, 06:25 PM
Is this still the case with the Q2 release? In our application, the scale is different based on various pieces of data. If there is no databinding support, what is the recommended method of dynamically setting up the tick marks?
0
Andrey
Telerik team
answered on 10 Aug 2010, 03:33 PM
Hi kilhoffer,

The Q2 release supports binding to the ItemsSource property of TickList.
Note that you should set the MajorTicks to "-1" to avoid adding standard tick marks to the list.
I've attached a small solution with data binding example.

Sincerely yours,
Andrey Murzov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Gauges
Asked by
Bill Sivill
Top achievements
Rank 1
Answers by
Andrey
Telerik team
kilhoffer
Top achievements
Rank 1
Share this question
or